//通过颜色来生成一个纯色图片- (UIImage *)buttonImageFromColor:(UIColor *)color{ CGRect rect = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.he....
分类:
移动开发 时间:
2015-04-09 15:09:18
阅读次数:
209
1、动画(头部-开始动画)[UIView beginAnimations:nil context:nil];2、设置动画的执行时间[UIView setAnimationDuration:2.0]; // 默认时间是1/4秒,可根据自己需要设置3、设置向上移动CGRect temFrame = _b...
分类:
其他好文 时间:
2015-04-09 10:30:54
阅读次数:
96
·UILable是iPhone界面最基本的控件,主要用来显示文本信息。
·常用属性和方法有:
1、创建
CGRect rect = CGRectMake(100, 200, 50, 50);
UILabel *label = [[UILabel alloc] initWithFrame:rect];
2、text //设置和读取文本内容,默认为nil
label.text = @”文本...
分类:
其他好文 时间:
2015-04-08 16:31:25
阅读次数:
193
ios7---Lable自适应高度封装
+(UILabel *)getInfoLabel:(UILabel *)label withText:(NSString *)ktext withFont:(CGFloat )kfont withtosize:(CGRect)krect withBackGroundColor:(UIColor *)kbackgroundColor
{
//内容显示 ...
分类:
其他好文 时间:
2015-04-08 16:29:35
阅读次数:
94
#pragma mark 根据size截取图片中间矩形区域的图片 这里的size是正方形-(UIImage *)cutCenterImage:(UIImage *)image size:(CGSize)size{ CGSize imageSize = image.size; CGRect...
分类:
其他好文 时间:
2015-04-06 15:34:55
阅读次数:
132
1.TabBar的层次结构
2.自定义TabBar的背景
可以将一个很短的图片拉长作为背景图片,方法:
self.backgroundColor = [UIColor
colorWithPatternImage:[UIImage
imageWithName:@"tabbar_background"]];
- (id)initWithFrame:(CGRect)f...
分类:
其他好文 时间:
2015-04-06 01:07:21
阅读次数:
177
·UILable是iPhone界面最基本的控件,主要用来显示文本信息。
·常用属性和方法有:
1、创建
CGRect rect = CGRectMake(100, 200, 50, 50);
UILabel *label = [[UILabel alloc] initWithFrame:rect];
2、text //设置和读取文本内容,默认为nil
label.text = @”文本...
分类:
移动开发 时间:
2015-04-04 15:15:07
阅读次数:
104
key code- (void)webViewDidFinishLoad:(UIWebView *)aWebView{ CGRect frame = aWebView.frame; frame.size.height = 1; aWebView.frame = frame; ...
分类:
Web程序 时间:
2015-04-02 18:36:26
阅读次数:
192
1-(id)initWithFrame:(CGRect )frame ImagesAndStringsOfObject:(id )image,...{ self=[super initWithFrame:frame]; if(self) { va_list argum...
分类:
其他好文 时间:
2015-03-30 15:49:42
阅读次数:
226
获取状态栏的尺寸
CGRect rect;
rect=[[UIApplication sharedApplication]statusBarFrame];
获取屏幕尺寸
CGRect rect;
rect=[[UIScreen mainScreen]bounds];
CGSize size=rect.size;
CGFloat width=size.w...
分类:
其他好文 时间:
2015-03-30 09:29:48
阅读次数:
101