- 浏览: 234362 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
lanzhiyuan:
楼主还混这里不?NSData *data = [NSURLCo ...
[转] 为UIWebView实现离线浏览 -
hyc4117:
#define OpenSSLRSAPublicKeyFile ...
IOS openssl rsa encrypt/decrypt -
guogongjun:
确实有效,不错,感谢啦大神
[转]安装openfire后admin无法登录管理控制平台 -
xiongyoudou1:
怎么办,而且你那下载的demo和你讲解的不是一样
[转] 为UIWebView实现离线浏览 -
xiongyoudou1:
有问题。执行到方法NSData *data = [NSURLC ...
[转] 为UIWebView实现离线浏览
1、分享到Facebook连接。
2、移除ABPeoplePickerNavigationController右边的Cancel按钮
摘自:http://stackoverflow.com/questions/1611499/abpeoplepickernavigationcontroller-remove-cancel-button-without-using-privat
3.ios multipart request related code:
See http://stackoverflow.com/questions/8561403/multipart-formdata-image-upload-get-the-file
See https://gist.github.com/1354221
See http://en.wikipedia.org/wiki/MIME
4.Popup 效果弹出视图
5.上下摇晃动画效果
6.检查ARC的宏
http://m.facebook.com/sharer.php?u=URL&t=标题
2、移除ABPeoplePickerNavigationController右边的Cancel按钮
ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init]; picker.delegate = self; ................. - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { // Here we want to remove the 'Cancel' button, but only if we're showing // either of the ABPeoplePickerNavigationController's top two controllers viewController.navigationItem.rightBarButtonItem = nil; }
摘自:http://stackoverflow.com/questions/1611499/abpeoplepickernavigationcontroller-remove-cancel-button-without-using-privat
3.ios multipart request related code:
- (void) uploadPicture{ UIImage *img = [UIImage imageNamed:@"icon.png"]; NSData *imageData = UIImageJPEGRepresentation(img, 90); //Here i tried 2 ways of getting the data for uploading, but both don't work. // create the URL NSURL *postURL = [NSURL URLWithString:@"http://*********/PictureUpload"]; // create the connection NSMutableURLRequest *postRequest = [NSMutableURLRequest requestWithURL:postURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0]; // change type to POST (default is GET) [postRequest setHTTPMethod:@"POST"]; // just some random text that will never occur in the body NSString *stringBoundary = @"0xKhTmLbOuNdArY---This_Is_ThE_BoUnDaRyy---pqo"; // header value, user session ID added NSString *headerBoundary = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", stringBoundary]; // set header [postRequest addValue:headerBoundary forHTTPHeaderField:@"Content-Type"]; // create data NSMutableData *postBody = [NSMutableData data]; // text part [postBody appendData:[[NSString stringWithFormat:@"--%@\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"title\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[@"hello" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; // media/image part [postBody appendData:[[NSString stringWithFormat:@"--%@\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"file\"; filename=\"%@.jpeg\"\r\n", @"helloImage"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[@"Content-Type: image/jpeg\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[NSData dataWithData:imageData]]; [postBody appendData:[@"Content-Transfer-Encoding: binary\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; // final boundary [postBody appendData:[[NSString stringWithFormat:@"--%@--\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; NSString *s = [[NSString alloc] initWithData:postBody encoding:NSASCIIStringEncoding]; NSLog(@"%@", s); // add body to post [postRequest setHTTPBody:postBody]; // pointers to some necessary objects NSURLResponse* response; NSError* error; // synchronous filling of data from HTTP POST response NSData *responseData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&error]; [NSURLConnection sendAsynchronousRequest:postRequest queue:[NSOperationQueue currentQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { if (error) { NSLog(@"Error: %@", [error localizedDescription]); } // convert data into string NSString *responseString = [[NSString alloc] initWithBytes:[responseData bytes] length:[responseData length] encoding:NSUTF8StringEncoding]; // see if we get a welcome result NSLog(@"%@", responseString); }]; }
See http://stackoverflow.com/questions/8561403/multipart-formdata-image-upload-get-the-file
See https://gist.github.com/1354221
See http://en.wikipedia.org/wiki/MIME
4.Popup 效果弹出视图
CGAffineTransform transform = CGAffineTransformIdentity; [self.view setTransform:CGAffineTransformScale(transform, 0.3, 0.3)]; [UIView animateWithDuration:0.2 animations:^{ [self.view setTransform:CGAffineTransformScale(transform, 1.1, 1.1)]; } completion:^(BOOL finished) { [UIView animateWithDuration:0.13 animations:^{ [self.view setTransform:CGAffineTransformScale(CGAffineTransformIdentity, 0.9, 0.9)]; } completion:^(BOOL finished) { [UIView animateWithDuration:0.13 animations:^{ [self.view setTransform:CGAffineTransformScale(CGAffineTransformIdentity, 1.0, 1.0)]; } completion:^(BOOL finished) { //do nothing }]; }]; }];
5.上下摇晃动画效果
CALayer*viewLayer=[self.inputHolderView layer]; CABasicAnimation*animation=[CABasicAnimation animationWithKeyPath:@"transform"]; animation.duration=0.1; animation.repeatCount = 4; animation.autoreverses=YES; animation.fromValue=[NSValue valueWithCATransform3D:CATransform3DRotate(viewLayer.transform, -0.03, 0.0, 0.0, 0.05)]; animation.toValue=[NSValue valueWithCATransform3D:CATransform3DRotate(viewLayer.transform, 0.03, 0.0, 0.0, 0.05)]; [viewLayer addAnimation:animation forKey:@"wiggle"];
6.检查ARC的宏
#if !__has_feature(objc_arc) [result autorelease]; #endif
发表评论
-
ios 开发技术
2015-01-09 11:59 698引用 主题:xcode 6制作动态&静态库 连接:ht ... -
ios 错误合集(updated!)
2015-01-09 11:57 773引用 错误:dyld: Library not loaded ... -
几个不错的xcode插件
2014-09-11 13:33 62611、代码补全插件 http://alcatraz.io 2、 ... -
xcode 插件目录
2014-09-11 13:14 428~/Library/Application\ Suppor ... -
GCD 倒计时
2014-08-19 10:00 973-(void)startTime{ __bloc ... -
Eventkit使用案例
2014-02-15 16:06 3166- (void)createNewEventAndNewR ... -
ios 应用内跳转到系统设置界面的最好写法
2013-04-24 11:43 10125如下是跳转到系统设置诸多界面的url prefs:roo ... -
beeframework "___gxx_personality_sj0", referenced from:错误解决
2013-04-17 13:50 1791到Bee_Precompile.h 找到如下一行: #de ... -
pod update/install git pull 443错误解决
2013-01-22 18:38 2295自从12306.cn抢票插件搞爆github服务器以后,我就再 ... -
[转]如何编写一个CocoaPods的spec文件
2012-12-27 16:25 14263本文转自http://ishalou.com/blog/201 ... -
[转]How to use NSAttributedString in iOS 6
2012-12-25 16:09 2554本文转自:http://soulwithmobiletechn ... -
mac上的小工具(updated)
2012-12-24 18:05 947mac上显示隐藏文件的命令,如果要隐藏则 -bool fals ... -
github README.md 编辑技巧小结 (updated)
2012-12-18 11:39 20331.文字连接 [文字](http://ace.ajax.org ... -
iOS 怎样更方便使用第三方框架
2012-11-29 12:45 1578管理第三方库越来越成为每个程序员的基本工作,因为每次都要去加入 ... -
CocoaPods:管理 Objective-C 專案裡頭各種 Library 關聯性最棒的方式
2012-11-26 14:53 1012介绍: 开发应用的时候第三方的库是不可缺少的,它能提高开发的 ... -
转载:用HTML5/CSS3/JS开发Android/IOS应用框架大全
2012-11-22 15:16 1215现在,用js调用本地代码已经不是一件新鲜事,已经有成熟的库来做 ... -
core data 分页查询
2012-11-07 11:26 1494NSFetchRequest *request = [[N ... -
[转]从Flurry导出数据
2012-10-17 10:51 1147有时我们需要一些详细 ... -
AFNetworking multipart upload
2012-10-12 14:52 5400+ (NSDictionary*)parametersOf ... -
IOS openssl rsa encrypt/decrypt
2012-09-29 15:15 6342对OpenSSL RSA加解密的封 ...
相关推荐
Swift-Project-Template, 轻松创建iOS项目基础代码的脚本 ! Swift-Project-Template 通过执行脚本并回答一些项目问题,在几秒钟内创建你的iOS基础项目。 这就是我们开始从头开始使用一个新的iOS项目的原因 !Swift ...
1.播放gif图片 2.读取网络图⽚ 3。多线程
iOS代码自动翻新(混淆)专家。.zip,u3d、cocos2dx、iOS代码混淆、自动翻新专家(WHC_ConfuseSoftware)是一款新一代运行在MAC OS平台的App、完美支持Objc和Swift、U3D、Cocos2dx项目代码的自动翻新(混淆)、支持文件夹...
ios代码规范整理
iOS代码混淆,马甲包混淆,iOS4.3被拒,ZFJObsLibV1.5.4-iOS混淆工具.dmg https://zfj1128.blog.csdn.net/article/details/95482006
好评率100%,一行代码搞定导航栏颜色、透明度、标题、状态栏、偏移等,强烈推荐 oc和swift都有 github地址:https://github.com/wangrui460/WRNavigationBar 简书实现过程地址:...
IOS代码示例-登录+界面切换+界面间传参,代码简洁,亲测可用。IOS代码示例-登录+界面切换+界面间传参,代码简洁,亲测可用。IOS代码示例-登录+界面切换+界面间传参,代码简洁,亲测可用。IOS代码示例-登录+界面切换+...
腾讯 QMUI Team 常用的 Xcode Code Snippets 代码片段,加速开发效率!.zip,用于Xcode使用的iOS通用代码片段,其中也包含若干专用于QMUI iOS框架的代码片段。
iOS代码混淆工具,iOS源码混淆工具,iOS审核4.3,重复上架,iOS代码混淆|iOS代码混淆工具|过4.3审核|4.3解决|4.3被拒|4.3审核被拒|other被拒|other审核被拒|iOS代码混淆助手|unity3d混淆|cocos2dx混淆|flutter混淆|...
iOS代码混淆加密工具 制作iOS马甲包,包括代码加密、代码混淆、修改方法名、修改类名、生成垃圾代码、修改工程名等 https://zfj1128.blog.csdn.net/article/details/95482006
ios 代码 技巧总结 个人从学习ios以来的一些总结 因为水平一般 所以比较杂 每个单独的都是写在一个txt文件中 希望能对新学的童鞋有所帮助吧
25条iOS代码编写技巧与建议
iOS安全攻防,代码混淆,敏感词替换,易读字符替换。
iOS 代码开发规范 一 . 关于命名 iOS 代码规范 命名要求含义清楚,尽量做到不需要注释也能了解其作用; 不要偷懒,勤加注释; 命名使用英语,不要使用拼音、数字。
iOS代码混淆加密工具、iOS马甲包混淆工具 马甲包上架 https://blog.csdn.net/u014220518/article/details/95482006
IOS 代码规范
kvo的ios代码,kvo即创建一个观察者,当观察的对象的属性发生变化时,观察者就会去执行某些相应的事件
https://zfj1128.blog.csdn.net/article/details/95482006