基础小控件 /***************************************UIlabel*************************************/ UILabel *label = [[UILabel alloc]init];//创建UIlabel对象 label.frame = CGRectMake(50, 50, 100, 50);//设定label的位置与大小 label.backgroundColor = [UIColoryellowColor];//…
// //  ViewController.m //  UI_Lesson3 // //  Created by archerzz on 15/8/13. //  Copyright (c) 2015年 archerzz. All rights reserved. // #import "ViewController.h" @interface ViewController () <UIAlertViewDelegate> // 活动指示器 @property (nonat…
转载请注明出处 : http://blog.csdn.net/shulianghan/article/details/50163725 一. 分段控件 (UISegmentedControl) 控件展示 : 1. UISegmentedControl 控件属性 (1) Style 属性 Style 属性 :       -- Plain : 分段控件使用最普通的风格; -- Bordered : 在最普通风格上添加一圈边框; -- Bar : 分段控件使用工具条风格; (2) State 属性…
//UIActivityIndicatorView //小菊花,加载 #import "ActivityIndicatorVC.h" @interface ActivityIndicatorVC (){ UIActivityIndicatorView *_activity ; } @end @implementation ActivityIndicatorVC -(void)viewDidLoad{ [super viewDidLoad]; [self createActivityIn…
一.UISwitch 1.初始化 UISwitch *s1 = [[UISwitch alloc]initWithFrame:CGRectMake(50, 170, 100, 200)];   2.设置相关属性 s1.onTintColor = [UIColor blueColor]; s1.tintColor = [UIColor greenColor]; s1.thumbTintColor = [UIColor redColor]; 3.设置开关状态 s1.on = YES; 4.添加事件…
工作之余,学习下swift大法.把自己的学习过程分享一下.当中的布局很乱,就表在意这些细节了.直接上代码: UIButton+UILabel // // ViewController.swift // manyControl // // Created by shaoting on 16/3/23. // Copyright © 2016年 9elephas. All rights reserved. // /// swift控件篇 // UIButton // UILabel import U…
1 //UIActivityIndicatorView //小菊花,加载====================================================================================== 2 3 #import "ActivityIndicatorVC.h" 4 5 @interface ActivityIndicatorVC (){ 6 UIActivityIndicatorView *_activity ; 7 } 8 9…
由于项目中有这样一个需求:需要在保存是弹出框选择保存的地点.选择UIAlertView来实现,但是要在UIAlertView中增加UISwitch的控件,这就需要自定义一个继承UIAlertView的类来自定义UIAlertView了. 实现效果如下:(还没加图的) 我需要在点击确定的时候,知道两个Switch的状态,才能进一步做相应的功能. 自定义了SaveAlertView类. 在.h中,需要自定义一个@protocol,作为把switch状态传出去的出口. 声明相应的委托.看源码 #imp…
##DAY2 UILabel.UITextField.UIButton.UIImageView.UISlider #pragma mark ———————UILabel——————————— UILabel属性: text:文本内容 textColor:内容的颜色 textAlignment:对齐方式(水平方向) font:字体 numberOfLines:行数 lineBreakMode:断行模式 shadowColor:阴影颜色 shadowOffset:阴影大小(阴影向x正⽅向偏移a,向y…
这个是和UIAlertView类似,但是可以自定义view的样式废话不多说,上代码: 首先第一步:创建一个继承自View的类如: #import <UIKit/UIKit.h> @class <#你自己的类名#>; @protocol PopupViewDelegate <NSObject> - (void)popupView:(<#你自己的类名#>*)popupView ClickedButtonAtIndex:(NSInteger)buttonIndex…