daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NSArray* bundle = [[NSBundle mainBundle] loadNibNamed:@"QnA" owner:self options:nil];
  2.  
  3. QuestionAnswer *qa;
  4. for (id object in bundle) {
  5.     if ([object isKindOfClass:[QuestionAnswer class]])
  6.         qa = (QuestionAnswer *)object;
  7.     }
  8.  
  9. CGRect f = qa.frame;
  10. f.origin.x = x;
  11. f.origin.y = y;
  12. qa.frame = f;
  13. [self.view addSubview: qa];
  14. [qa setup:[questions objectAtIndex:i ]];
  15.    
  16. -(void)setup:(NSString *)label
  17. {
  18.     self.afl.text = label;
  19.     UITapGestureRecognizer *tgr = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(imageTapped:)];
  20.     tgr.delegate = self;
  21.     [self addGestureRecognizer:tgr];
  22.  
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top