Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Standard Image Button Icons for iOS in Xcode

Tags:

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

like image 834
Lior Z Avatar asked Apr 03 '14 22:04

Lior Z


People also ask

How do I get SF Symbols in Xcode?

Using Custom Symbols Using a custom symbol in your app is incredibly easy. Switch to Xcode and select the main asset catalog, Assets. xcassets, in the Project navigator on the left. Switch to Finder and drag your new SF Symbol into the asset catalog.

How do I add icons to my iPhone Xcode?

Create an App Icon SetIn the Project navigator, select an asset catalog. Click the Add button (+) at the bottom of the outline view. In the pop-up menu, choose a platform, and select [OS] App Icon. Xcode creates a new app icon set with the name AppIcon .

What size are iOS icons?

Normal iOS App Icon Sizes120px × 120px (60pt × 60pt @2x)

What is 1x 2x and 3x in iOS?

1x, 2x, and 3x images allow developers and Apple to optimize app presentation based on the user's device, whether an entry-level iPhone or the most expensive iPad. Conceptually, 1x, 2x, and 3x images are the same image -- simply at different sizes.


2 Answers

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,
like image 139
rounak Avatar answered Nov 09 '22 13:11

rounak


If you are using the Apple Story board,

  1. open the story board
  2. click on the UIBarItem, then click on the sytem item as shown in the picture below.

You should be able to set the system icons from here.

Click on the System Item

like image 42
ru2wen2 Avatar answered Nov 09 '22 12:11

ru2wen2