按钮UIButton
复选框UICheckBox
滑块UISlider
图片UIImageView
进度条UILoadingBar
纹理文本 UITextAtlas
字体文本 UIText
图片字体文本 UITextBMFont
文本区域 UITextField
布局组件 UILayout
滚动组件 UIScrollView
页面切换组件 UIPageView
列表组件 UIListView
所有控件都继承 UIWidget...
分类:
其他好文 时间:
2014-08-19 14:32:34
阅读次数:
492
结构是:在uiLabel上添加uiButton初始化都很简单,主要如何实现单选的效果,因为切换的步骤相同,所以就单独写了方法这是用YES和NO的定值来判断的,并且注意使用UIControlStateSelected才有动态改变的效果。如果需要默认选择某个,可以采用延后调用的方法(uiButton 是...
分类:
其他好文 时间:
2014-08-19 12:49:54
阅读次数:
188
首先我们自定义的UIbutton UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.frame = CGRectMake(100, 100, 200, 200); UIbutton有四个状态,4张imag...
分类:
其他好文 时间:
2014-08-16 16:23:30
阅读次数:
219
首先上张图:1:ios6导航栏默认按钮rightBarButtonItem 是不是很丑的赶脚?现在通过以下方法来改变以下;code: UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeCustom]; rightButt...
分类:
移动开发 时间:
2014-08-16 12:27:00
阅读次数:
205
//iOS7和其他系统版本跳转链接不一样- (void)clickUrl:(id)sender{ UIButton *bt = (UIButton *)sender; NSString *str = @""; if( ([[[UIDevice currentDevi...
分类:
移动开发 时间:
2014-08-14 01:05:37
阅读次数:
254
#import @interface APRoundedButton : UIButton@property (nonatomic, assign) int style;@end//// Created by Alberto Pasca on 27/02/14.// Copyright (c) .....
分类:
其他好文 时间:
2014-08-13 12:32:26
阅读次数:
212
假设A跳转到B,三种方法:1.按住ctrl键,拖动A上的控件(比如说UIButton)到B上,弹出菜单,选择Modal.不需要写任何代码,在A上点击Button就会跳转到B2. 按住ctrl键,拖动A上的View Controller到B上,弹出菜单,选择Modal,两个场景间自动添加连接线和图标,...
分类:
移动开发 时间:
2014-08-13 00:40:04
阅读次数:
1178
与其他用户界面控件交互UIControl子类会覆盖parentView的gesture.例如当用户点击UIButton时,UIButton会接受触摸事件,它的parentView不会接收到.这仅适用于手势识别重叠的默认动作的控制,其中包括:一根手指单击动作:UIButton, UISwitch, U...
分类:
移动开发 时间:
2014-08-12 16:08:54
阅读次数:
334
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.frame = CGRectMake(5, self.alertView.lableView.frame.size.height + self.checkBox.fra...
分类:
其他好文 时间:
2014-08-08 11:55:15
阅读次数:
246
-(void)viewDidLoad{//初始化self.btn1 = [UIBotton buttonWithType:UIButtonTypeRoundedRect];//设置大小self.btn1.frame = CGRectMake(20,20,100,50);//设置标题[self.btn...
分类:
其他好文 时间:
2014-08-06 17:41:01
阅读次数:
172