1。eclipse系统的按钮你可以在Windows-Show View中选择或者在toolbar上右键选择“自定义”
2。eclipse程序的toolbar按钮,挂上VE,可以很直观的看到用法。
//首先需要创建一个NSMutableArrayNSMutableArray *buttons=[[NSMutableArray alloc]initWithCapacity:3]
[buttons autorelease]
//创建一个 UIBarButtonItem 系统刷新按钮 并且加入到Array中
UIBarButtonItem *freshButton=[[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemRefresh target:self action:@selector(OnrefreshMap:)]
[buttons addObject:freshButton]
[freshButton release]
//创建一个空格 ,加入到array,用来将下面加入的按钮按照右边对齐
UIBarButtonItem *SpaceButton=[[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemFlexibleSpace target:nil action:nil]
[buttons addObject:SpaceButton]
[SpaceButton release]
//创建一个 系统 搜索按钮,加入到array,放到右边
UIBarButtonItem *searchSelfButton=[[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemSearch target:self action:@selector(OnFindSelf:)]
[buttons addObject:searchSelfButton]
[searchSelfButton release]
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)