objective c - How to add activity indicator to navbar? -
hey, want display activity indicator on right corner of navbar when user changes selection in picker wheel. have no idea how add activity indicator there able add normal navbar buttons there. help? in advance!
uiactivityindicatorview *activityindicator = [[uiactivityindicatorview alloc] initwithframe:cgrectmake(0, 0, 20, 20)]; uibarbuttonitem *barbutton = [[uibarbuttonitem alloc] initwithcustomview:activityindicator]; [[self navigationitem] setrightbarbuttonitem:barbutton]; [barbutton release]; [activityindicator startanimating]; this should work. from: http://iosdevelopertips.com/user-interface/adding-an-activity-indicator-spinner-to-navigation-bar.html
Comments
Post a Comment