- 博客(27)
- 收藏
- 关注
转载 第三方资源篇
一:源代码实例 1:快速搭建项目源代码 地址:https://github.com/wujunyang/MobileProject 2:高仿美团iOS版 地址:https://github.com/lookingstars/meituan 3:模仿网易新闻做的精仿网易新闻 地址:https://github.com/dsxNiubility/SXNews 4:支付宝高仿版 地址:http...
2017-04-06 16:26:00
1194
转载 修饰属性
当修饰可变类型的属性时,如NSMutableArray、NSMutableDictionary、NSMutableString,用strong。 当修饰不可变类型的属性时,如NSArray、NSDictionary、NSString,用copy。 转载于:https://www.cnblogs.com/GJRBlog/p/6202851.html...
2016-12-20 15:29:00
232
转载 密码强度正则表达式
数字字母字符:[-\da-zA-Z=\\;',./~!@#$%^&*()_+|{}:<>?]*((\d+[a-zA-Z]+[-=\;',./~!@#$%^&*()_+|{}:<>?]+)|(\d+[-=\\;',./~!@#$%^&*()_+|{}:<>?]+[a-zA-Z]+)|([a-zA-Z]+\d+[-=\;',./~!...
2016-11-23 14:50:00
269
转载 打开 macOS Sierra 允许“任何来源”选项,运行第三方应用
如果需要恢复允许“任何来源”的选项,请打开终端,在终端运行以下命令(可能会要求输入密码): sudo spctl --master-disable 转载于:https://www.cnblogs.com/GJRBlog/p/6018254.html...
2016-11-01 09:21:00
232
转载 IOS开发-UIView之动画效果的实现方法
一、使用UIView类实现动画 基本写法,代码必须放在Begin和Commit之间: [UIView beginAnimations:nil context:nil]; // 开始动画 // Code... [UIView commitAnimations]; // 提交动画 简单例子: [UIView beginAnimations:nil context:nil]; // 开始动画 ...
2016-10-31 10:51:00
179
转载 跳转系统设置的方法
iOS10.0之前跳转系统设置的方法 NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];[[UIApplication sharedApplication] openURL:url]; iOS10.0之后的跳转方法 // Option for openURL:options:CompletionHa...
2016-10-14 08:37:00
240
转载 iOS拨打电话(三种方法)
1,这种方法,拨打完电话回不到原来的应用,会停留在通讯录里,而且是直接拨打,不弹出提示 NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"186xxxx6979"]; // NSLog(@"str======%@",str); [[UIApplication sharedApplicatio...
2016-10-08 10:20:00
167
转载 tableView索引
当然在UITableView中还有关于索引的相关属性设置如下: _myTableView.sectionIndexColor = [UIColorblueColor];//设置默认时索引值颜色 _myTableView.sectionIndexTrackingBackgroundColor = [UIColorgrayColor];//设置选中时,索引背景颜色 _myTableView....
2016-09-30 17:28:00
196
转载 Xcode8.0 Beta 6 - unable to read from device
This is the error when the symbols are missing. Usually you get this error when your device has higher version than the Xcode such as iOS 10 vs Xcode 7.3 In this case Xcode 8 beta 6 failed to cop...
2016-09-14 16:38:00
214
转载 图片 360度旋转动画
pragma mark --- 旋转动画 (void)rotate360DegreeWithImageView:(UIImageView )imageView { CABasicAnimation animation = [ CABasicAnimation animationWithKeyPath: @"transform" ]; animation.fromValue = [NSV...
2016-08-29 17:18:00
654
转载 广告页面的跳过按钮倒计时功能可以通过定时器或者GCD实现
// GCD倒计时 (void)startCoundown { __block int timeout = showtime + 1; //倒计时时间 + 1 dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_source_t _ti...
2016-08-29 14:55:00
391
转载 App 启动加载广告做法和思路
需求 很多app(如淘宝、美团等)在启动图加载完毕后,还会显示几秒的广告,一般都有个跳过按钮可以跳过这个广告,有的app在点击广告页之后还会进入一个广告页面,点击返回进入首页。今天我们就来开发一个广告页面,效果如下。 思路 1.广告页加载思路。广告页的内容要实时显示,在无网络状态或者网速缓慢的情况下不能延迟加载,或者等到首页出现了再加载广告页。所以这里我不采用网络请求广告接口获取图片地址...
2016-08-29 11:25:00
272
转载 字符串中英文混合...获取字符串的字符长度
-(int)convertToInt:(NSString)strtemp { int strlength = 0; char p = (char)[strtemp cStringUsingEncoding:NSUnicodeStringEncoding]; for (int i=0 ; i<[strtemp lengthOfBytesUsingEncoding:NSUnicodeS...
2016-08-29 11:06:00
177
转载 iOS UILabel设置行间距和字间距,根据内容计算高度
-(void)setLabelSpace:(UILabel)label withValue:(NSString)str withFont:(UIFont)font { NSMutableParagraphStyle paraStyle = [[NSMutableParagraphStyle alloc] init]; paraStyle.lineBreakMode = NSLineBre...
2016-08-29 11:04:00
166
转载 自动调整Label高度\宽度
NSDictionary *attributes = @{NSFontAttributeName:[UIFont systemFontOfSize:14],NSForegroundColorAttributeName:[UIColor whiteColor]}; CGSize captionSize = [caption boundingRectWithSize:CGSizeMake(1...
2016-08-02 15:08:00
315
转载 ios7.0和8.0上面如何修改弹框的的title的字体颜色。
首先在iOS7.0修改UIActionSheet title的字体是很简单的,设置代理,在willPresentActionSheet方法中修改。代码如下: (void)willPresentActionSheet:(UIActionSheet )actionSheet { for (UIView subViwe in actionSheet.subviews) { if ([subV...
2016-07-29 10:38:00
187
转载 IOS-TextField
//初始化textfield并设置位置及大小 UITextField *text = [[UITextField alloc]initWithFrame:CGRectMake(20, 20, 130, 30)]; //设置边框样式,只有设置了才会显示边框样式 text.borderStyle = UITextBorderStyleRoundedRect; typedef enum { U...
2016-07-19 17:24:00
136
转载 对TextView的字数进行统计
import "ViewController.h" define MAXVALUE 10 define MINVALUE 5 @interface ViewController () @property (nonatomic, strong) UITextView textView; @property (nonatomic, strong) UILabel tipLabel; @end...
2016-07-18 09:45:00
276
转载 StoryBoard下ScrollView如何添加约束
想了下就决定用ScrolleView, ContentSize可以设置为560. 这样在其他屏幕上没有太多的影响,在3.5的屏幕下也可以滑动了。但是在StoryBord拖过ScrollView,添加约束的时候发现他并不会按照你猜想的去执行。经过查阅资料,大致知道了原因。这是由于scrollview本身contentSize、contentInsets等复杂的特性导致,苹果文档在讲auto...
2016-07-12 11:45:00
175
转载 隐藏空的cell
//隐藏空的cell -(UIView )tableView:(UITableView )tableView viewForFooterInSection:(NSInteger)section { if ([self numberOfSectionsInTableView:tableView]==(section+1)) { return [UIView new]; } return n...
2016-07-11 10:24:00
212
转载 让UITableviewCell 的分割线左对齐
if ([self.WQAdressListTableView respondsToSelector:@selector(setSeparatorInset:)]) { [self.WQAdressListTableView setSeparatorInset: UIEdgeInsetsZero]; } if ([self.WQAdressListTableView respondsTo...
2016-07-11 09:59:00
176
转载 转场动画 CATransition
关于苹果的动画支持类,可叹其强大,性能以及 动画效果惊人。膜拜啊! 转场动画就是从一个场景以动画的形式过渡到另一个场景。转场动画的使用一般分为以下几个步骤: 1.创建转场动 2.设置转场类型、子类型(可选)及其他属性画 3.设置转场后的新视图并添加动画到图层 下表列出了常用的转场类型(注意私有API是苹果官方没有公开的动画类型,但是目前通过仍然可以使用): 动画类型 说明 对应常量 ...
2016-07-06 10:24:00
185
转载 关于uitableviewcell的accessoryType属性
使用的话,例如: cell.accessoryType = UITableViewCellAccessoryNone;//cell没有任何的样式 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;//cell的右边有一个小箭头,距离右边有十几像素; cell.accessoryType = UITableVi...
2016-05-18 11:06:00
109
转载 iphone NSString 字符串处理:截取字符串、匹配字符串、分隔字符串
1.截取字符串 NSString*string =@"sdfsfsfsAdfsdf"; string = [string substringToIndex:7];//截取掉下标7之后的字符串 NSLog(@"截取的值为:%@",string); [string substringFromIndex:2];//截取掉下标2之前的字符串 NSLog(@"截取的值为:%@",string); ...
2016-05-18 10:24:00
129
转载 HTTP状态码(HTTP Status Code),常见的error 404, error 504等的意思
HTTP状态码(HTTP Status Code),常见的error 404, error 504等的意思 一些常见的状态码为: 200 – 服务器成功返回网页 404 – 请求的网页不存在 503 – 服务不可用 详细分解: 1xx(临时响应) 表示临时响应并需要请求者继续执行操作的状态代码。 代码 说明 100 (继续) 请求者应当继续提出请求。 服务器返回此代码表示已收到请求的第一...
2016-05-12 09:04:00
357
转载 UINavigationCountroller pop到指定界面
for (UIViewController *controller in self.navigationController.viewControllers) { if ([controller isKindOfClass:[patrolSignViewController class]]) { [self.navigationController popToViewController...
2016-05-05 15:09:00
145
转载 mac系统如何显示和隐藏文件
苹果Mac OS X操作系统下,隐藏文件是否显示有很多种设置方法,最简单的要算在Mac终端输入命令。显示/隐藏Mac隐藏文件命令如下(注意其中的空格并且区分大小写): 显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool true 隐藏Mac隐藏文件的命令:defaults write com.apple...
2016-04-20 09:32:00
178
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人