ios

Ios – Standard Image Button Icons for iOS in Xcode

ios

Does anyone know where I can find the standard image icons (add, share, refresh, etc.) for iOS? Better yet, can someone direct me to a simple example of adding such a button to a tool bar? I can't seem to find one anywhere.

Thanks

Best Solution

Use the - (id)initWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItem target:(id)target action:(SEL)action; method to add UIBarButtons to your toolbar.

UIBarButtonItem *barButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSearch target:target action:action];

These are the types available

UIBarButtonSystemItemDone,UIBarButtonSystemItemCancel,UIBarButtonSystemItemEdit,  UIBarButtonSystemItemSave,  UIBarButtonSystemItemAdd,UIBarButtonSystemItemFlexibleSpace,UIBarButtonSystemItemFixedSpace,UIBarButtonSystemItemCompose,UIBarButtonSystemItemReply,UIBarButtonSystemItemAction,UIBarButtonSystemItemOrganize,UIBarButtonSystemItemBookmarks,UIBarButtonSystemItemSearch,UIBarButtonSystemItemRefresh,UIBarButtonSystemItemStop,UIBarButtonSystemItemCamera,UIBarButtonSystemItemTrash,UIBarButtonSystemItemPlay,UIBarButtonSystemItemPause,UIBarButtonSystemItemRewind,UIBarButtonSystemItemFastForward,