0 Replies - 691 Views - Last Post: 13 February 2016 - 06:32 AM

#1 Kiee79  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 13-February 16

Delegate is kind of nightmare

Posted 13 February 2016 - 06:32 AM

Hello guys. My code :

popover.m
+ (TaggingAdditionl *) createInstance {

        
        TaggingAdditionl *taggingXibView = [[[NSBundle mainBundle] loadNibNamed:@"TaggingPopOver" owner:self options:nil] objectAtIndex:0];
         [taggingXibView setFrame:[UIScreen mainScreen].bounds];
         [taggingXibView setBackgroundColor:[UIColor redColor]];
          
    

    
        return  taggingXibView;
    
    }



vc.m
- (IBAction)test:(GradientButton *)sender {
    
    self.popover = [TaggingAdditionl createInstance];
    BSEAppDelegate *appDelegate = (BSEAppDelegate *)[[UIApplication sharedApplication] delegate];
    [appDelegate.window addSubview:self.popover];
    
    

}




My popover is connected with .xib file. When i press button in my VC i get my popover view. In xib i added X - close button but i have no idea how to use delegate to send this form popover to VC. Could someone write needed code it helps me understand.

Thanks a lot.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1