uiview
漂阳过海
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
iOS UIImageView
//获取本地图片 UIImageView *imgV=[[UIImageView alloc]initWithFrame:self.view.frame]; UIImage *imge=[UIImage imageNamed:@"456.jpg"]; imgV.image=imge; [self.view addSubview:imgV]; //获原创 2016-01-12 22:24:27 · 204 阅读 · 0 评论 -
UIAlertController
-(IBAction)hahah:(id)sender{ UIAlertController *alertc=[UIAlertController alertControllerWithTitle:@"网络设置" message:@"message" preferredStyle:UIAlertControllerStyleAlert]; //添加密码框原创 2016-01-12 22:45:45 · 356 阅读 · 0 评论 -
UIScrollView(滑动视图)
//设置一个scrollview给他大小(容器) UIScrollView *myscroll=[[UIScrollView alloc]initWithFrame:self.view.frame]; myscroll.backgroundColor=[UIColor blackColor]; UIImage *img=[UIImage imageName原创 2016-01-12 22:46:27 · 226 阅读 · 0 评论 -
UIPickerView(选择框)
dic=@{@"xian":@[@"a",@"b",@"c"],@"hangzhou":@[@"d",@"e",@"f"],@"wuhan":@[@"g",@"h",@"z"]}; NSString *path=[[NSBundle mainBundle]pathForResource:@"cities" ofType:@"plist"]; arry1=[[NSMutableA原创 2016-01-12 22:47:03 · 415 阅读 · 0 评论 -
UIProgressView(进度条)
//创建一个进度条 myprogress=[[UIProgressView alloc]initWithFrame:CGRectMake(0, 300, self.view.frame.size.width, 30)]; //进度条的类型 myprogress.progressViewStyle=UIProgressViewStyleBar; //为进度条添原创 2016-01-12 22:47:46 · 494 阅读 · 0 评论 -
UISegmentedControl(分段控制器)
mysegmen=[[UISegmentedControl alloc]initWithItems:@[@"one",@"two",@"three"]]; mysegmen.frame=CGRectMake(100, 100, 200, 60); //初始位置 mysegmen.selectedSegmentIndex=1; mysegmen.tintCol原创 2016-01-12 22:48:20 · 306 阅读 · 0 评论 -
UISlider
mysilider=[[UISlider alloc]initWithFrame:CGRectMake(0, 500, width, 300)]; mysilider.value=0.1;// mysilider.maximumValueImage=[UIImage imageNamed:@""];// mysilider.minimumValueImage=[UII原创 2016-01-12 22:48:51 · 225 阅读 · 0 评论 -
UISwitch
myswitch=[[UISwitch alloc]initWithFrame:CGRectMake(100, 100, 100, 100)]; [myswitch setOnTintColor:[UIColor purpleColor]]; //ios6可以使用// [myswitch setOffImage:[UIImage imageNamed:@"home"原创 2016-01-12 22:49:27 · 214 阅读 · 0 评论 -
UITabBarController
oneViewController *onev=[[oneViewController alloc]init]; UINavigationController *nav1=[[UINavigationController alloc]initWithRootViewController:onev]; twoViewController *twov=[[twoView原创 2016-01-12 22:49:56 · 187 阅读 · 0 评论 -
UIPageControl
UIPageControl类提供一行点来指示当前显示的是多页面视图的哪一页。当然,由于UIPageControl类可视样式的点击不太好操作,所以最好是确保再添加了可选择的导航选项,以便让页面控件看起来更像一个指示器,而不是一个控件。当用户界面需要按页面进行显示时,使用UIPageControl控件将要显示的用户界面内容分页进行显示会使编程工作变得快捷。UIPageControl *原创 2016-01-12 22:45:05 · 181 阅读 · 0 评论 -
UIActionSheet
UIActionSheet是在iOS弹出的选择按钮项,可以添加多项,并为每项添加点击事件。-(IBAction)sheetshow:(id)sender{ UIActionSheet *sheetnow=[[UIActionSheet alloc]initWithTitle:@"相片设置功能" delegate:self cancelButtonTitle:@"取消" d原创 2016-01-12 22:44:27 · 392 阅读 · 0 评论 -
iOS 动画
NSMutableArray *arrimg=[NSMutableArray arrayWithCapacity:6]; for (int i=1; i NSString *imgname=[NSString stringWithFormat:@"%d.jpg",i]; UIImage *image=[UIImage imageNamed:imgnam原创 2016-01-12 22:25:48 · 163 阅读 · 0 评论 -
UIButton
//用代码创建一个button; mysetbutton=[[UIButton alloc]initWithFrame:CGRectMake(0, 100, 200, 100)]; [mysetbutton setTitle:@"来自代码的button" forState:UIControlStateNormal]; [mysetbutton setTitle:@"原创 2016-01-12 22:26:36 · 161 阅读 · 0 评论 -
Font
UILabel *mylabel=[[UILabel alloc]initWithFrame:CGRectMake(100, 100, 300, 60)]; mylabel.text=@"你好"; [self.view addSubview:mylabel];//设置字体大小 mylabel.font=[UIFont systemFontOfSize:30];原创 2016-01-12 22:28:36 · 316 阅读 · 0 评论 -
framebounds
tale=[[UITableView alloc]initWithFrame:self.view.frame]; [self.view addSubview:tale]; UIView *buttonv=[[UIView alloc]initWithFrame:CGRectMake(100, 100, 300, 300)]; buttonv.backg原创 2016-01-12 22:33:56 · 217 阅读 · 0 评论 -
UITextField(文本输入框)
//编辑一个用户名输入框 mytextfield_name=[[UITextField alloc]initWithFrame:CGRectMake(100, 100, 200, 60)]; mytextfield_name.tag=99; mytextfield_name.placeholder=@"请输入用户名"; mytextfield_name.au原创 2016-01-12 22:42:08 · 218 阅读 · 0 评论 -
UIView
self.view.backgroundColor=[UIColor orangeColor]; UIView *v1=[[UIView alloc]initWithFrame:CGRectMake(100, 100, 200, 200)]; v1.backgroundColor=[UIColor purpleColor]; [self.view addSubview原创 2016-01-12 22:42:46 · 159 阅读 · 0 评论 -
UINavigationController(导航控制器)
myViewController *myv=[[myViewController alloc]init]; //创建导航控制器并且添加根视图 UINavigationController *nav=[[UINavigationController alloc]initWithRootViewController:myv]; self.window.rootViewCo原创 2016-01-12 22:43:18 · 321 阅读 · 0 评论 -
UIAlertView(警告提示)
-(IBAction)showPhonenum:(id)sender{ UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"请您检测网络" message:@"在手机设置里面->通用->网络" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];原创 2016-01-12 22:43:51 · 383 阅读 · 0 评论 -
UITabBarController2
//调用init方法时自动调用-(instancetype)init{ self=[super init]; if (self) { self.navigationItem.title=@"首页"; //设置tabbar的类型 UITabBarItem *taitem=[[UITabBarItem alloc]initW原创 2016-01-12 22:50:24 · 216 阅读 · 0 评论
分享