iphone - LocalNotification display on UIcollectionView -


i set localnotification able display on uicollectionview. however, know how make display on uitable. should in order convert uitable uicollectionview? uicollectionview display uilabel time , date while have background image @ back.

here code building uitable local notification.

- (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section {     // return number of notifications     return [[[uiapplication sharedapplication] scheduledlocalnotifications] count]; }  - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath {      static nsstring *cellidentifier = @"cell";      uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier];     if (cell == nil) {         cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstylesubtitle reuseidentifier:cellidentifier];     }     cell.textlabel.textcolor = [uicolor whitecolor];      // list of local notifications     nsarray *notificationarray = [[uiapplication sharedapplication] scheduledlocalnotifications];     uilocalnotification *notif = [notificationarray objectatindex:indexpath.row];      // display notification info     [cell.textlabel settext:notif.alertbody];       return cell; } 

a table view , collection view both use cells display content. once have collection view, 2 operations you've shown here (determining number of rows , populating text row's cell) same collection view.

follow tutorial collection view working, , @ numberofitemsinsection , cellforitematindexpath: , compare them methods have above - should able use code tableview:numberofrowsinsection: verbatim, , code other method minor changes.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -