iphone - select a row from view when a push notification is received -
i trying select row table view when push notification received.
i have myprojectappdelegate.h
#import <uikit/uikit.h> #import "iw.h" #import "bookmark.h" @interface myprojectappdelegate : nsobject <uiapplicationdelegate, uitabbarcontrollerdelegate> { uiwindow *window; uitabbarcontroller *tabbarcontroller; uinavigationcontroller *navigationcontroller; nsmutablearray *tabledata; nsmutablearray *imageslist; iboutlet bookmark *tablecell; } @property (nonatomic, retain) iboutlet uiwindow *window; @property (nonatomic, retain) iboutlet uitabbarcontroller *tabbarcontroller; @property (nonatomic, retain) iboutlet uinavigationcontroller *navigationcontroller; @property(nonatomic, retain) nsmutablearray *tabledata; @property(nonatomic, retain) nsmutablearray *imageslist; - (bool)getislaunched; - (void)showservice; - (void)showmessage; - (void) loadlogolist; + (const nsstring*)getversion; + (const nsstring*)getxmlversionurl; + (nsmutabledictionary *)logos; + (void)setlogos:(nsmutabledictionary *)newdictionary; - (void)checkversion; @end
and implementing didreceiveremotenotification in myprojectappdelegate.m file tableview implemented in class bookmarklist.m when app start after launch options navigates bookmarklist.m , displays table view.
i want access tableview in bookmarklist.m , select row in table when ever receive push notification.
please me this. new ios programming.
thanks.
you can add observer method in bookmarklist.m
class this
[[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(newmessagereceived:) name:@"newmessage" object:nil];
and add observer method in same class
-(void)newmessagereceived:(nsnotification *) notification{ //here can select row want selected }
then in didreceiveremotenotification
in appdelegate
file, post notification , pass data want post in object parameter.
[[nsnotificationcenter defaultcenter] postnotificationname:@"newmessage" object:nil];
hope helps.
Comments
Post a Comment