有谁知道我在哪里可以找到iOS的标准图像图标(添加,共享,刷新等)?更好的是,有人能指示我一个简单的例子,将这样一个按钮添加到工具栏吗?我似乎无法在任何地方找到。Xcode中的iOS标准图像按钮图标
感谢
有谁知道我在哪里可以找到iOS的标准图像图标(添加,共享,刷新等)?更好的是,有人能指示我一个简单的例子,将这样一个按钮添加到工具栏吗?我似乎无法在任何地方找到。Xcode中的iOS标准图像按钮图标
感谢
使用- (id)initWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItem target:(id)target action:(SEL)action;
方法添加UIBarButtons
到工具栏。
UIBarButtonItem *barButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSearch target:target action:action];
这些都可以
UIBarButtonSystemItemDone,
UIBarButtonSystemItemCancel,
UIBarButtonSystemItemEdit,
UIBarButtonSystemItemSave,
UIBarButtonSystemItemAdd,
UIBarButtonSystemItemFlexibleSpace,
UIBarButtonSystemItemFixedSpace,
UIBarButtonSystemItemCompose,
UIBarButtonSystemItemReply,
UIBarButtonSystemItemAction,
UIBarButtonSystemItemOrganize,
UIBarButtonSystemItemBookmarks,
UIBarButtonSystemItemSearch,
UIBarButtonSystemItemRefresh,
UIBarButtonSystemItemStop,
UIBarButtonSystemItemCamera,
UIBarButtonSystemItemTrash,
UIBarButtonSystemItemPlay,
UIBarButtonSystemItemPause,
UIBarButtonSystemItemRewind,
UIBarButtonSystemItemFastForward,
如果您使用的是苹果故事板的类型,
您应该可以从这里设置系统图标。
谢谢,看起来不错。但是,你能告诉我如何设定行动吗?意思是,我怎样称呼这个功能? (我对iOS开发非常陌生) –
目标将是实现该方法的对象,并且动作将是@selector(methodName) – rounak
方法在同一个.m中,对不对? –