iphone - Displaying Image and Message in Viewcontroller and Dissmiss after Specific Time in IOS -
i want display viewcontroller , contains image , message . viewcontroller needs displayed when pushnotification arrives , pushnotification contains message , id . id i'll fetch image server , need display in viewcontroller specific time interval , dismiss automatically .
till have completed pushnotification , getting image server, next thing need display in viewcontroller.
can 1 please me out?
you can try this,
in appdelegate.m
- (void)application:(uiapplication *)application didreceiveremotenotification:(nsdictionary *)userinfo { viewcontroller *vc=[[viewcontroller alloc]initwithnibname:@"viewcontroller" bundle:nil]; vc.image=// set image vc.message=//message [[uiapplication sharedapplication].keywindow.rootviewcontroller presentviewcontroller:vc animated:yes completion:nil]; }
in viewcontroller.m
-(void)viewwillappear:(bool)animated { [nstimer scheduledtimerwithtimeinterval:60 target:self selector:@selector(closevc) userinfo:nil repeats:no]; } -(void)closevc { [self dismissviewcontrolleranimated:yes completion:nil]; }
Comments
Post a Comment