自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 ios 内存管理

1 iOS 对象释放步骤https://blog.csdn.net/bravegogo/article/details/509658642 深入理解Autoreleasehttps://www.jianshu.com/p/dfec601d84da

2018-12-04 11:47:43 139

原创 iOS 动画相关

1 图片旋转[UIView animateWithDuration:0.2 animations:^{            _titleBtn.imageView.transform = CGAffineTransformMakeRotation(-M_PI+0.01);        }]; https://www.jianshu.com/p/a53611d7eda5...

2018-12-04 11:47:30 144

原创 iOS 加密相关

1  对称加密和非对称加密介绍和区别https://www.cnblogs.com/labimeilexin/p/7350448.html对称加密优缺点优缺点:算法公开,计算量小,加密速度快,加密效率高双方使用相同的钥匙,安全性得不到保证注意事项:密钥的保密工作非常重要密钥要求定期更换 2 hash 与 md5的关系https://blog.csdn.net/sh...

2018-12-04 11:47:02 159

原创 ios 内存分配

http://www.cocoachina.com/ios/20161009/17700.html1  iOS_04_数据类型、常量、变量https://www.cnblogs.com/-ljj/p/3710561.htmliOS 中的常量定义:const  #define  枚举 ...2 Static关键字理解https://www.jianshu.com/p/9c0998...

2018-12-04 11:46:38 141

转载 ios 组件化

https://blog.csdn.net/u014205965/article/details/78025799

2018-12-02 21:55:13 115

原创 返回按钮相关(有侧滑)以及右侧按钮

一、 backBarButtonItem1 修改系统返回按钮颜色 和文字颜色在 appdelegate中    UINavigationBar * navigationBar = [UINavigationBar appearance];        //返回按钮的箭头颜色        [navigationBar setTintColor:[UIColor c

2016-10-18 21:06:45 486

原创 WebView相关

sdept 1@interface WebViewController ()@property (nonatomic,strong)UIWebView * mywebview;sdept2  self.mywebview = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width

2016-07-02 11:24:20 296

原创 ios github使用

1. 注册github账号2. 点击右上角+号,创建New Repository (选择Public)使用xcode 进行版本控制接上面1.在电脑上生成ssh密钥2. 打开生成密钥时的.pub文件,把里面的内容复制到  github--->edit profile---->personal setting -->ssh key3.打开xcode  新建一个项目,选择chec

2016-04-07 11:07:40 451

转载 归档

iOS 归档的记录 归档是一种很常用的文件储存方法,几乎任何类型的对象都能够被归档储存(实际上是一种文件保存的形式),浏览网上的一些资料后,并结合自己的一些经验,总结成此文。一、使用archiveRootObject进行简单的归档 使用NSKeyedArichiver进行归档、NSKeyedUnarchiver进行接档,这种方式会在写入、读出数据之前对数据进行序列化、反序列化操

2016-03-31 12:38:06 307

转载 本地化字符串

七、字符串的本地化1.创建一个字符串资源文件2.文件名最好是Localizable.strings,如果使用其他文件名,使用字符串时的调用会有些区别3.为Localizable.strings添加多语言支持(跟上面图片本地化类似),选中Localizable.strings文件,查看右上角的视图4.选了Localize代表会将Locali

2016-03-31 12:36:43 1878

原创 捕捉崩溃日志

-、在- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    NSSetUncaughtExceptionHandler (&UncaughtExceptionHandler);    return YE

2016-03-31 12:26:51 233

原创 refreshControl

self.refreshControl = [[UIRefreshControl alloc] init];    [self.refreshControl addTarget:self action:@selector(downloadData) forControlEvents:UIControlEventValueChanged];    [self.tableView ad

2016-03-31 12:22:18 233

原创 app被拒邮件

一、Your app declares support for location in the UIBackgroundModes key in your Info.plist file but does not declare any features that require persistent location. Apps that declare support for loca

2016-03-31 12:17:04 1684

原创 网络请求原生

网络请求原生NSData *paramData = [NSJSONSerialization dataWithJSONObject:dataResultM options:NSJSONWritingPrettyPrinted error:NULL];        NSString *paramString = [[NSString alloc] initWithDat

2016-03-31 12:12:31 264

转载 storyBoard

storyBoardhttp://blog.csdn.net/xuqiang918/article/details/17023737    [self performSegueWithIdentifier:@"" sender:self];

2016-03-31 12:09:52 235

原创 segementControl相关

一、设置   segementControl 的title字体大小 和颜色NSDictionary * dicN = [NSDictionary dictionaryWithObjects:@[[UIFont systemFontOfSize:17],[UIColor whiteColor]] forKeys:@[NSFontAttributeName,NSForegroundColorA

2016-03-31 11:56:42 492

原创 蓝牙相关

一、现在程序中使用到了蓝牙功能,但是在蓝牙关闭的情况下,程序每次运行都会提示“打开蓝牙来允许连接到配件”,控制这个系统提示//没有系统提示 NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:NO], CBCentralManagerOpt

2016-03-31 11:45:06 352

原创 处理证书无效

https://developer.apple.com/certificationauthority/AppleWWDRCA.cer

2016-03-31 11:40:46 394

原创 设置DEBUG模式

一、building setting ---> Apple LLVM 7.0 Preprocessing------->Debug 输入:DEBUG = 1二、Product—> scheme  ——>   edit scheme     三、常用宏#ifdef DEBUG#define LMLog(...) NSLog (@"%s -> Line:%d -

2016-03-30 12:31:06 339

原创 添加pch 文件和 header文件

一 、添加pch文件        1 ios->other->PCH file,创建一个pch文件,添加需要引入的头文件名      2 把该文件的路径添加到 building setting ---> Apple LLVM 7.0 Language------->prefix Header选项中去二 、添加header文件         1 添加header文件

2016-03-30 12:23:33 373

转载 检测版本号

NSString * curentVersionStr = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey];// appStore 跳转方法一NSString *str =@"http://itunes.apple.com/cn/app/id1006513728"

2015-11-25 15:20:38 441

转载 app被拒原因

【干货】appstore审核被拒的各种原因拇指巴士 2014-07-14 08:01 1. Terms and conditions(法律与条款)1.1 As a developer of applications for the App Store you are bound by the terms of the Program License Agreement (P

2015-11-24 17:33:34 409

转载 cocoaPods

iOS开发~CocoaPods使用详细说明2014-08-06 11:08 25320人阅读 评论(12)收藏 举报分类: ios(56) 一、概要iOS开发时,项目中会引用许多第三方库,CocoaPods(https://github.com/CocoaPods/CocoaPods)可以用来方便的统一管理这些第三方库。

2015-11-23 12:30:24 392

转载 定位相关

在iOS 8中,苹果已经强制开发者在请求定位服务时获得用户的授权,此外iOS状态栏中还有指示图标,提示用户当前应用是否正在使用定位服务。另外在iOS 8中,苹果进一步改善了定位服务,让开发者请求定位服务时需要向用户提供更多的透明。此外,iOS 8中还支持让应用开发者调用全新的“访问监控”功能,当用户允许后应用才能获得更多的定位数据。

2015-09-17 14:49:31 298

原创 查看项目崩溃日志

方法1    ~/Library/Logs/CrashReporter/MobileDevice/方法2 打开Xcode   ---->window---->divices----->选中要查看的设备,view divice logs

2015-09-17 09:56:18 295

原创 app后台运行

1.info.plist  添加1行,选择 required background modes , item0 写 audio (ios8会变成默认的字符串)2. 添加avfoundation库    3. appdelegate里面添加头文件 #import 4  @implementation AppDelegate{    NSTimer * backGroudTim

2015-09-16 19:11:50 371

原创 File not found

看图片

2015-09-15 15:12:33 277

转载 关于APPIcon

iOS Developer LibraryDeveloperSearchApp Icons on iPad and iPhoneTechnical Q&A QA1686App Icons on iPad and iPhoneQ: How are the icon files in my application bundle used

2015-07-27 15:21:40 399

原创 加载本地Html文件

NSString * resousePath = [[NSBundle mainBundle]resourcePath];        NSString * filePath = [resousePath stringByAppendingPathComponent:@"patient_agreement.html"];        NSString * htmlString = [[

2015-07-27 11:25:01 694

原创 TabelViewCell展开

//从服务器请求回数据 if ([run_numintValue] == 1) {                       NSArray *arr = [dictionary valueForKey:@"key"];            [self.ArrdataremoveAllObjects];                  

2015-05-14 15:22:50 576

原创 GCD

-(void)loadData{dispatch_async(dispatch_get_global_queue(0, 0), ^{    NSString*str=[NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://1000phone.net:8088/app/iAppFree/api/appcate.p

2015-05-11 16:43:10 488

原创 动态计算字符串大小

- (CGSize)getframeAndStr:(NSString*)str andwidth:(int)width{    CGSize lasize = [str sizeWithFont:[UIFont systemFontOfSize:15] constrainedToSize:CGSizeMake(width, 300) lineBreakMode:NSLineBreakByW

2015-05-08 14:32:18 817

原创 文件创建 数据写入 读取 删除

// 创建文件路径   (有三种沙盒路径,根据需求 请自选) NSArray * paths =NSSearchPathForDirectoriesInDomains(NSCachesDirectory,NSUserDomainMask, YES);    NSString * cachPath = [[pathsobjectAtIndex:0]stringByAppe

2015-04-27 17:47:40 876

原创 NSUserDefaults 相关

1~NSUserDefaults是个plist文件,理论上上限可达到设备极限。但是NSUserDefaults建议只是简单快速地保存小型数据,正如其名 - 用户的设置。可以在沙盒里创建一个新的plist存储你要存的数据,只要找对文件的沙盒路径即可,想全局调用它可以把沙盒此plist文件的读写写成一个单例调用。机制原理是一样的。当然犯懒用NSUserDefaults也可,数据多了无非会影

2015-04-27 09:46:28 672

原创 16进制颜色值变幻UIColer

+ (UIColor *) colorFromHexRGB:(NSString *) colorString{    UIColor *result =nil;   unsigned int colorCode = 0;   unsigned char redByte, greenByte, blueByte;       if (nil != colo

2015-04-24 14:04:16 750

转载 _block

__block   分享类型:游戏开发相关__block 小试验3楼 neogui版主:没有__block qualifier的primitive c types会直接在创建block的时候被capture到block里。有__block qualifier的话,会在调用block的时候取&number地址所指

2015-04-24 14:01:37 439

原创 带输入框的UIAlertView

UITextField * textFiled1;UITextField * textFiled2;UIAlertView * alert = [[UIAlertViewalloc]initWithTitle:@"请输入"message:@"账号和密码"delegate:selfcancelButtonTitle:@"取消"otherButtonTitl

2015-04-22 17:01:08 590

转载 iOS 精通UIPasteboard 粘贴板

有时候我们可能需要复制UILabel上的文本,或者UIImageView的图片,而UILabel和UIImageView默认是不响应Touch事件的,也无法复制,那么我们就需要自己实现一个可复制的UILabel。新添加一个类继承自UILabel:@interface UICopyLabel : UILabel  @end #import "UICopyLabel.h" 

2015-04-22 15:09:26 562

原创 iOS 禁止横屏

在AppDelegate中增加- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window      {           return UIInterfaceOrientationMaskPortrait;  

2015-04-22 15:07:26 400

原创 iOS 数据类型转换

1~ 字典转换成Json字符串    NSMutableDictionary * dataDic = [[NSMutableDictionaryalloc]init];    [dataDicsetValue:@"haha1"forKey:@"1"];    [dataDicsetValue:@"lala2"forKey:@"2"];    [dataD

2015-04-22 15:04:04 308

空空如也

空空如也

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

TA关注的人

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