UIView *statusBarView=[[UIView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, 20)]; statusBarView.backgroundColor=[UIColor blackColor]; [se...
分类:
其他好文 时间:
2015-04-01 19:35:52
阅读次数:
91
UILabel的相关操作:①初始化:UILabel是UIView的子类,拥有UIVi所有办法 UILable *label = [[UILabel alloc] initWithFrame:CGRectMake(,,,);②背景颜色 label.backgroundColor = [UIColor ...
分类:
其他好文 时间:
2015-04-01 19:15:10
阅读次数:
129
#import @interface CircleProgressView : UIView/**起始值(0-1)*/@property(nonatomic,assign)CGFloat fstartValue;/**边框宽度*/@property(nonatomic,assign)CGFloat ...
分类:
其他好文 时间:
2015-04-01 17:21:36
阅读次数:
104
#import "ViewController.h"@interface ViewController (){ UIButton *btn;}@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoa...
分类:
其他好文 时间:
2015-04-01 16:50:06
阅读次数:
120
第一种方法:,使用监听
UIView beginAnimations
方法如下:
[UIView beginAnimations:nil context:nil];
//代理,监听对象
[UIView setAnimationDelegate:self]; //removeCover 是动画执行完后要调用方法
[UIView setAnimation...
分类:
移动开发 时间:
2015-04-01 15:28:10
阅读次数:
121
活动指示器(UIActivityIndicatorView)可以告知用户有一个操作正在进行中。派生自UIView,所以他是视图,也可以附着在视图上。
一.创建
UIActivityIndicatorView* activityIndicatorView = [ [ UIActivityIndicatorView alloc ]
initWithFrame:CGRec...
分类:
其他好文 时间:
2015-04-01 15:23:02
阅读次数:
128
这个系列的文章只是简单地把开发过程中的一些技巧总结起来,方便以后查阅。exclusiveTouchexclusiveTouch是UIView的一个属性。Exclusive是“独家”的意思,所以这个方法的作用就是把某个UIView的触碰事件设置为独家事件,即如果多个设置了exclusivetouch的...
分类:
移动开发 时间:
2015-04-01 01:39:45
阅读次数:
176
1.1 - (void)layoutSubviews;* 当一个控件的frame发生改变的时候就会自动调用* 一般在这里布局内部的子控件(设置子控件的frame)* 一定要调用super的layoutSubviews方法1.2 - (void)didMoveToSuperview;* 当一个控件被添...
分类:
其他好文 时间:
2015-04-01 00:00:28
阅读次数:
407
转自:http://www.cnblogs.com/bucengyongyou/archive/2012/10/15/2723814.html在tableView初始化的时候 UIView*v = [[UIViewalloc]initWithFrame:CGRectZero]; [self.my.....
分类:
其他好文 时间:
2015-03-31 21:54:50
阅读次数:
104
3.使用xib封装一个自定义view的步骤1> 新建一个继承UIView的自定义view,假设类名叫做(MJAppView)2> 新建一个MJAppView.xib文件来描述MJAppView内部的结构3> 修改UIView的类型为MJAppView真是类型4> 将内部的子控件跟MJAppView进...
分类:
其他好文 时间:
2015-03-31 21:39:32
阅读次数:
139