![]() I repeat, this is just for testing purpose, finally I would like to simply assign the system provided search icon. Īnd the result is that the master button simply does not display. barButtonItem.title = searchBarButton.image A symbol image contains a vector-based shape that scales without losing its sharpness. ![]() In my app the master view will be some kind of search view, so I would like the button called master to be displaying the system provided search icon.įirst of all I simply do not know how to programmatically (at runtime) add a system icon to a button ? I know how to select it in the storyboard in Xcode at development time but not at runtime.Īs I don't know how to do it, for testing purpose I add a right bar button on the top of the bar and I simply assign its image to the master button, like this : - (void)splitViewController:(UISplitViewController *)splitController willHideViewController:(UIViewController *)viewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)popoverController Symbol images give you a consistent set of icons to use in your app, and ensure that those icons adapt to different sizes and to app-specific content. Self.masterPopoverController = popoverController To display this button the following code is used - (void)splitViewController:(UISplitViewController *)splitController willHideViewController:(UIViewController *)viewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)popoverControllerīarButtonItem.title = setLeftBarButtonItem:barButtonItem animated:YES] Starting from the spliview master/detail example I found in the SDK, I end up having an iPad app that has a master on the left hand side in landscape, whereas in portrait a button called "Master" allows displaying the master.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |