![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
iPhone开发
wfkbyni
这个作者很懒,什么都没留下…
展开
-
iphone和ipad设置束的运用!
首先先创建一个Settings.bundle文件,在Root.plist文件编辑信息,首先Application Preferences一共有[b]1.PSTextFieldSpecifier2.PSTitleValueSpecifier3.PSToggleSwitchSpecifier4。PSSliderSpecifier5.PSMultiValueSpecifier...2011-08-18 17:04:50 · 103 阅读 · 0 评论 -
ios开发申请发布证书和发布应用到app store
1.http://www.360doc.com/content/13/1224/09/14615320_339677793.shtml 2.http://my.oschina.net/joanfen/blog/133642原创 2014-03-21 11:03:42 · 93 阅读 · 0 评论 -
IOS 基于APNS消息推送原理与实现(JAVA后台)
转:http://cshbbrain.iteye.com/blog/1859810原创 2014-04-09 17:30:02 · 124 阅读 · 0 评论 -
分享一个非常好的东西
http://makeappicon.com/ 传一个1024*1024的图片上去,会生成各种尺寸的Icon,包括android,ios6,ios7!!2014-04-09 17:44:39 · 83 阅读 · 0 评论 -
ios Icon及启动图集合
做icon和启动图按这个尺寸来原创 2015-05-04 09:13:23 · 105 阅读 · 0 评论 -
UINavigationItem 位置问题
解决ios7 UINavigationItem 位置偏移问题#import @interface UINavigationItem (Spacing)-(void)mySetLeftBarButtonItem:(UIBarButtonItem*)barButton;-(void)mySetRigthBarButtonItem:(UIBarButtonItem*)barBut...原创 2015-05-06 14:09:07 · 114 阅读 · 0 评论 -
weakSelf
快速的定义一个weakSelf 当然是用于block里面啦#define WS(weakSelf) __weak __typeof(&*self)weakSelf = self;原创 2015-05-11 14:44:44 · 115 阅读 · 0 评论 -
压缩图片,如果图片大于100kb,就循环压缩
// 压缩图片,如果图片大于100kb,就循环压缩+ (NSData *)compressionWithImage:(UIImage *)image{ // 先按宽度压缩 UIImage *newImage = [image resizeImageGreaterThan:480]; NSData *data; float qual...原创 2015-06-02 10:37:44 · 632 阅读 · 0 评论 -
AFNetWorking请求WebService
.h#import typedef void(^SuccessBlock)(NSString *dataString);typedef void(^FialdBlock)(NSString *dataString);@interface HttpRequest : NSObject+(void)requestWtihParams:(NSDictionary *)...原创 2015-06-15 17:22:52 · 171 阅读 · 0 评论 -
封装录音View
使用方法: 直接把XHRecrodView添加到controller可实现像微信那样的语音通话 // 添加录音view XHRecrodView* recrodView = [[XHRecrodView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_textview.frame) + 20, SCREEN_WIDTH, 100...原创 2015-06-26 16:13:59 · 96 阅读 · 0 评论 -
UITableView点击展开cell
1.定义控制cell的两个变量 //最近打开的index int currentClickIndex; //是否打开cell BOOL isOpenCell;2.给变量赋值- (void)viewDidLoad{ [super viewDidLoad]; currentClickIndex = -1; ...2014-04-25 15:14:32 · 173 阅读 · 0 评论 -
记录一些不错的文章
好久没有写ios了,这篇文章主要是记录一些看到的不错的文章:1.解决请求并发的问题。http://www.cocoachina.com/ios/20151009/13579.html2.layer相关的东西http://www.cocoachina.com/ios/20141022/10005.html3.自动布局Auto Layout 使用心得(一)—— 初体...原创 2015-10-09 20:04:16 · 85 阅读 · 0 评论 -
自定义的NavigationBar,我觉得还不错
地址1:http://code.cocoachina.com/detail/199714/CustomNavigationBar地址2:https://github.com/jimple/CustomNavigationBar原创 2014-04-28 18:03:26 · 68 阅读 · 0 评论 -
设置TabBar选中与未选中图片
-(void)settingTabbarController{ self.tabBarViewControoler.tabBar.selectionIndicatorImage = [UIImage imageNamed:@"tabbar_selected"]; for (int i = 0; i < self.tabBarViewControoler.tabBar.items...原创 2014-04-29 18:07:33 · 291 阅读 · 0 评论 -
一个公共的TableView,然后不会为每个TableView加delegate和datasource
.h//// PublicTableView.h// JointCrm//// Created by Mac on 15/10/27.// Copyright © 2015年 Mac. All rights reserved.//#import typedef void(^TableBlock)(UITableView *tableView,NS...原创 2015-10-27 10:46:52 · 150 阅读 · 0 评论 -
禁止WebView长按事件
在webViewDidFinishLoad调用:- (void)webViewDidFinishLoad:(UIWebView *)webView{ NSArray *subViewArray = webView.subviews; for (UIView *view in subViewArray) { NSArray* arra...原创 2015-11-04 16:05:24 · 917 阅读 · 0 评论 -
转 ios中对于tabBar选中图片设置的问题
http://blog.csdn.net/kevinwlc/article/details/21467499//核心代码UIimage* imageNormal = [UIImage imageNamed:@"tabhost_three_bg_nor"];UIimage* imageSelected = [UIImage imageNamed:@"tabhost_three_bg_...原创 2014-03-20 15:54:08 · 212 阅读 · 0 评论 -
把图片压缩到指定大小(kb)
UIImage *image=[UIImage imageNamed:@"xxoo.jpeg"]; NSData *imageData=UIImageJPEGRepresentation(image, 1.f); CGFloat size=40.f;// kb CGFloat scale=size/(imageData.length/1024); NSDa...原创 2015-01-19 16:32:04 · 1763 阅读 · 0 评论 -
获取当前时间属于该月的第几周
+(NSInteger) indexWeekOfDateInMonth:(NSDate*)date_{ NSCalendar *calendar = [NSCalendar currentCalendar]; NSDateComponents* components = [calendar components:NSYearCalendarUnit| NSMon...2015-01-06 15:04:20 · 444 阅读 · 0 评论 -
iPhone开发实现语言国际化
以上内容来自互联网。 一、获取系统所支持的国际化信息 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSArray *languages = [defaults objectForKey:@"AppleLanguages"]; NSLog(@"...原创 2011-07-01 10:07:31 · 79 阅读 · 0 评论 -
UILabel自适应字体宽度
UILabel* myLable=[[UILabel alloc] initWithFrame:CGRectMake(0, 23, 175, 33)]; [myLable setFont:[UIFont fontWithName:@"Helvetica" size:10.0]]; [myLable setNumb...原创 2011-07-28 14:02:58 · 119 阅读 · 0 评论 -
iphone常用代码(转)
更改cell选中的背景 UIView *myview = [[UIView alloc] init]; myview.frame = CGRectMake(0, 0, 320, 47); myview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"0006.png"]];...原创 2011-10-25 09:26:05 · 182 阅读 · 0 评论 -
正则的使用(转) 开发小技巧http://blog.csdn.net/doubleuto/article/details/6098876
NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+//.[A-Za-z]{2,4}"; NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", emailRegex];原创 2012-01-06 10:23:15 · 80 阅读 · 0 评论 -
iphone序列化文件
#pragma -#pragma 序列化列表+ (BOOL)saveMatchListToFile:(NSArray*)newMathcList { NSString *mathcListFile = [[PlayViewController getLocalMatchList] stringByAppendingFormat:@"matchList.arch", nil];...原创 2012-01-18 16:08:20 · 137 阅读 · 0 评论 -
转换东一到东八相差八小时时间
+(NSDate *)convertDateToLocalTime:(NSDate *)forDate { NSTimeZone *nowTimeZone = [NSTimeZone localTimeZone]; int timeOffset = [nowTimeZone secondsFromGMTForDate:forDate]; NSDate *n...原创 2012-02-01 14:09:23 · 180 阅读 · 0 评论 -
core date排序
//排序条件NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc]initWithKey:@"updateDate" ascending:YES]; //根据updateDate来排序,ascending:YES==》升序 //添加多个排序条件! NSArray *sortDescriptors ...原创 2011-11-25 10:45:32 · 70 阅读 · 0 评论 -
UITextField 只输入数据和小数点
#define NUMBERS @"0123456789.\n" //匹配的字符,可以加入你想要的字符- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ NSCharacter...原创 2011-11-25 17:19:22 · 73 阅读 · 0 评论 -
IOS 截屏
UIGraphicsBeginImageContext (CGSize)截图 ,是从屏幕原点开始截取size大小的图片如何截取任意起点开始 size 大小的图片,办法就是用CGContextTranslateCTM转换原点坐标//导入头文件//创建一个基于位图的图形上下文并指定大小为CGSizeMake(200,400)UIGraphicsBeginImageContext(CGS...原创 2012-03-12 10:26:40 · 189 阅读 · 0 评论 -
XCode4如何解决调试程序时,忽然崩溃,而找不到崩溃的代码
http://blog.csdn.net/diyagoanyhacker/article/details/6666047原创 2012-03-15 17:20:53 · 78 阅读 · 0 评论 -
ios中添加外部字体。。。
/* *查找ios所支持的所有字体 *使用外部字体的作法: * 1.导入.ttf字体 * 2.在plist中添加Fonts provided by application(类型为array) * 3.把导入的.ttf文件添加到array中的item中 * 4.把外部字体文字的名字带到日志中去查找ios支持的字体,相对应...原创 2012-08-21 17:08:09 · 104 阅读 · 0 评论 -
ios 监听设备方向发生改变
1.添加监听函数[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self ...原创 2013-05-17 14:25:26 · 314 阅读 · 0 评论 -
ios程序异常crash捕获与拦截
转:http://www.sharejs.com/codes/objectc/5882原创 2014-06-06 22:09:33 · 107 阅读 · 0 评论 -
iOS中使用block进行网络请求回调
转自: http://www.tuicool.com/articles/JFRfmq//// HttpRequest.h// UseBlockCallBack//// Created by Michael on 2/13/14.// Copyright (c) 2014 EIMS. All rights reserved.//#import ...原创 2014-06-23 16:26:09 · 250 阅读 · 0 评论 -
iOS开发的一些奇巧淫技
iOS开发的一些奇巧淫技 [color=red][b]http://www.cocoachina.com/ios/20141229/10783.html[/b][/color]TableView不显示没内容的Cell怎么办?类似这种,我不想让下面那些空的显示.01.png很简单.self.tableView.tableFooterView ...原创 2014-12-31 11:13:20 · 148 阅读 · 0 评论 -
block语法
How Do I Declare A Block in Objective-C?[b]As a local variable:[/b]1.returnType (^blockName)(parameterTypes) = ^returnType(parameters) {...};2.@property (nonatomic, copy) returnType (^...原创 2015-12-11 10:34:03 · 118 阅读 · 0 评论