加载中
iOS 正则匹配URL

`+ (NSString *)distinguishWebsiteStr:(NSString *)sourceStr{ NSString *targetStr = nil; NSError *error; NSString *regulaStr = @"((http[s]{0,1}|ftp)://[a-zA-Z0-9\\.\\-]+\\.([a-zA-...

2016/05/26 16:10
1.5K
iOS UILabel或者UITextview展示HTML链接

NSString * htmlString = [NSString stringWithFormat:@"计划时长:%ld天 <a href=\"http://www.baidu.com\">百度</a> 计划时长 <a href=\"http://www.baidu.com\">谷歌</a>",(long)self.sche...

2016/05/26 15:51
1.5K
iOS 根据view获取当前的UIViewController

//获取当前的UIViewController + (UIViewController *)currentVCWithCurrentView:(UIView *)view{ UIViewController *result = nil; for (UIView* next = [view superview]; next; next = ne...

2016/05/12 10:42
316
UIPickerView 简单使用

//实现一个计划设置时间的选择 //上个界面是时间列表的其中一个cell点击进入此页面 //.h文件 #import "MMViewController.h" @protocol ScheuduleStepTimeSettingDelegate <NSObject> -...

2016/03/27 15:31
77
UIImage拉伸图片的效果实现

- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight: (NSInteger)topCapHeight 这个函数是UIImage的一个实例函数,它的功能是创建一个内容可拉伸,而...

2016/03/19 20:10
47
iOS UIView增加阴影

//添加阴影 UIimageView *imageView = [[UIImageView alloc ] init]; imageView.layer.shadowColor = [UIColor blackColor].CGColor; imageView.layer.shadowOffset = CGSizeMak...

2016/03/11 15:14
602
iOS 项目常用宏

//判断字符串为空 #define EMPTY_STRING(string) \         ([string isKindOfClass:[NSNull class]] || string == nil || [string isEqualToString:@""]) //判断数组是...

2016/03/10 19:34
111
iOS常用动画代码

    //iOS常用动画代码                    UIImageView* bolingbolingImageView = [[UIImageView alloc]init];     [self.view addSubview:bolingbolingImag...

2015/12/30 17:19
166
iOS -----颜色转换为图片

- (UIImage*) createImageWithColor:(UIColor*)color {     CGRect rect=CGRectMake(0,0, 1, 1);     UIGraphicsBeginImageContext(rect.size);     CGContextRef conte...

2015/12/17 16:27
76
iOS UITableView

//刷新指定的indexPath     NSIndexPath *reloadIndexPath =      [NSIndexPath indexPathForRow:indexRow inSection:0];     [scheduleDetailListTableView reloadRowsA...

2016/03/27 15:27
34
iOS 修改搜索框的样式为白色

    //思路:正常SearchBar有一个灰色环绕边框,在searchBar外层加一个白色的背景,这个背景只够包围searchBar的搜索框部分     //同时调节searchBar的frame让它正好在白色背景呢,这...

2016/03/10 19:08
291
计算webView的高度

// index.html //html代码 <html> <body>     <div id="content" contenteditable="false" style="font-family: Helvetica">         <a href="id:abc" style="text-dec...

2016/02/28 17:05
104
inputView典型实现

#import "PostDetailInputCommentView.h" @interface PostDetailInputCommentView() <UITextFieldDelegate> @end @implementation PostDetailInputCommentView{     MMButton *...

2016/01/31 16:11
83
iOS获取当前设备信息

   //获取iOS设备的各种信息         NSString *device_token = [[[UIDevice currentDevice] identifierForVendor] UUIDString];     NSString *device_os = [[UIDev...

2016/01/22 15:27
176
iOS打开一个指定的应用

原则上iOS的沙箱原理,是阻止一个app去访问其他app的资源乃至是系统底层的资源的但是我们可以通过一种变相的方式:通过对应的URL模式和其他程序进行通讯. iOS应用之间的调用步骤: 一, 调用自...

2015/12/31 16:11
174
NSUserDefaults数据存储

存储一个数组,数组中数据为自定义类型的对象.

2015/09/15 17:25
220
iOS时间格式化的方法

**iOS时间格式化方法** //时间转换方法 //    long nowT = time(NULL);  获取当前时间 - (NSString *)revertTimeFormat:(long)timesp{     NSDate *data = [NSDate dateW...

2015/08/31 15:07
565
dirty memory

关于各种内存的解释,来源于stackoverflow Wired : This refers to kernel code and such. Memory that should not   ever be moved out of the RAM. Also know as ...

2015/08/30 22:11
542
iOS 常见适配问题

1、iOS 6 cell自定义分割线,在xib中会造成适配问题(不显示) //适配iOS 6 [(UIView *)[self viewWithTag:lineTag] removeFromSuperview]; UIColor *LCN = [[ThemeManager sharedT...

2015/08/04 19:18
66
iOS设置frame的简单方法

在iOS中view的frame属性使用地太频繁了,尤其是调UI的时候。我们知道,正常情况下我们无法对frame的某个属性(x,y,width,height等)进行单独修改,比如: someView.frame.x = 100; 这种方式是...

2015/07/23 16:46
863

没有更多内容

加载失败,请刷新页面

返回顶部
顶部