自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

原创 iOS7,修改SearchBar背景色

iOS8,遍历seachBar 得不到textfield了 就意味着之前的方法通通不能用了. mySearchBar = [[UISearchBar alloc]initWithFrame:CGRectMake(5, 28, self.navView.width - 70, 30)]; mySearchBar.delegate = self; mySearchBar.showsC

2015-03-27 10:02:40 589

原创 判断当前设备的具体型号.2015最新截止到iPad Air2

//#import "sys/utsname.h"-(NSString *)correspondVersion{ struct utsname systemInfo; uname(&systemInfo); NSString *platform = [NSString stringWithFormat:@"%s", systemInfo.machine];

2015-03-13 15:31:18 1223

原创 TableView插入Cell系统自带动画

NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:_goodsArray.count inSection:0]; HGGoodsListModel *model = [[HGGoodsListModel alloc]init]; [_goodsArray insertObject:model atIndex:_good

2015-02-13 11:55:39 753

原创 Alert Block方法.

.h文件-(void) handlerClickedButton:(void (^)(NSInteger btnIndex))aBlock;-(void) handlerCancel:(void (^)(void))aBlock;-(void) handlerWillPresent:(void (^)(void))aBlock;-(void) handlerDidPresent:(voi

2015-02-12 15:55:46 642

原创 点赞Layer动画代码

[self.button1 setImage:[UIImage imageNamed:(i%2==0?@"2":@"1")] forState:UIControlStateNormal];self.image1.layer.contents = (id)[UIImage imageNamed:(i%2==0?@"2":@"1")].CGImage;CAKeyframeAnimation *k =

2015-02-12 14:33:56 1401

转载 关于UIView的autoresizingMask属性

UIView中有个属性是autoresizingMask,该属性是用来控制控件的自适应。 UIViewAutoresizingNone                 = 0,UIViewAutoresizingFlexibleLeftMargin   = 1 UIViewAutoresizingFlexibleWidth        = 1 UIViewAutore

2013-10-23 15:11:21 618

转载 iOS 6.0 强制横屏

iOS6.0中shouldAutorotateToInterfaceOrientation被设为deprecated ,需追加supportedInterfaceOrientations方法来响应屏幕响应有一点要说明,在ios 6.0中supportedInterfaceOrientations设定的旋转的方向在plist的Supported interface orientati

2013-10-18 14:40:50 1306

原创 iOS7-隐藏状态栏

在系统的pist文件中增加这个两个属性Status bar is initially hidden                                           YESView controller-based status bar appearance                NO可以在全屏的时候隐藏最上面的状态栏

2013-10-17 15:33:39 894

转载 iOS7--- UILabel的自适应撑高

很多情况下,网络请求的内容不完全一致,需要自适应给定高度,本文简单实现了ios7 与ios7之前实现自适应撑高的方法,欢迎拍砖。  UILabel * testlable = [[UILabelalloc]initWithFrame:CGRectMake(10,200,200,20)];       NSString * tstring =@"香格里拉等全国

2013-10-15 11:24:41 1599

转载 动画

UIView的,翻转、旋转,偏移,翻页,缩放,取反的动画效果翻转的动画//开始动画    [UIView beginAnimations:@"doflip" context:nil];//设置时常    [UIView setAnimationDuration:1];//设置动画淡入淡出    [UIView setAnima

2013-10-11 15:03:25 571

转载 iOS手势识别(转)

使用手势识别六种手势识别(继承于UIGestureRecongnizer基类):UITapGestureRecongnizer--检测view上的单击操作UIPinchGestureRecongnizer--检测view上两个手指的缩放操作UIPanGestureRecongnizer--检测view的拖拽操作UISwipeGestureRecongnize

2013-10-10 21:36:40 861

转载 Block语法

Block可以帮助我们组织独立的代码段,并提高复用性和可读性。iOS4在UIKit中引入了该特征。超过100个的Apple API都使用了Block,所以这是一个我们必须开始熟悉的知识。Block是什么样的? 你可以使用^操作符来声明一个Block变量,它表示一个Block的开始。int num1 = 7;  int(^aBlock)(int) = ^)int nu

2013-10-10 21:33:18 595

转载 UIButton 使用全面解析

一、创建两种方法:1. 常规的 initWithFrame UIButton *btn1 = [[UIButton alloc]initWithFrame:CGRectMake(10, 10, 80, 44)]; 对代码创建View(UIControl继承自UIView,所以也是view)不甚了解的请参看:《有关View的几个基础知识点》 2. UIButton 的一个

2013-10-10 21:31:06 924

转载 UILabel的各种属性与方法的使用(转)

#import "LabelTestViewController.h"     @implementation LabelTestViewController     /*    Accessing the Text Attributes    text  property      font  property      textColor  pr

2013-10-10 21:29:17 690

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除