object-c
ParsonsYangBooy
这个作者很懒,什么都没留下…
展开
-
Objective-C如何将阿拉伯数字转汉字
-(NSString *)arabicNumeralsToChinese:(int)number{ switch (number) { case 0: return @"零"; break; case 1: retu原创 2016-09-12 11:45:19 · 523 阅读 · 0 评论 -
iOS集成QQ、微信、微博、短信、邮件分享(非第三方集成)
首先appdelegate中加入- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [WXApi handleO原创 2016-09-12 13:21:04 · 1032 阅读 · 0 评论 -
iOS tabelView 分割线从最左边开始及隐藏多余的cell
//分割线从最左边开始cell中也要设置 if([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) { self.tableView.separatorInset = UIEdgeInsetsZero;原创 2016-09-12 13:21:52 · 229 阅读 · 0 评论 -
改变cell的imageview的大小
//改变cell的image view的大小-(UIImage *)settingIcon:(NSString *)iconName height:(CGFloat)height { UIImage *icon = [UIImage imageNamed:iconName]; CGSize itemSize = CGSizeMak原创 2016-09-12 13:22:38 · 281 阅读 · 0 评论 -
iOS去掉按钮的点击效果
Button.adjustsImageWhenHighlighted = NO;原创 2016-09-12 13:23:14 · 1400 阅读 · 0 评论 -
iOS自定义日历控件
TXCalendarPicker.h#import@interface TXCalendarPicker : UIView@property(nonatomic,strong) UICollectionView *collectionView;@property (nonatomic , strong) NSDate *date;原创 2016-09-12 13:23:51 · 333 阅读 · 0 评论 -
iOS TableView如何刷新指定的cell 或section
//一个section刷新 NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2]; [tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic]; //一个cell刷新原创 2016-09-12 13:24:23 · 8469 阅读 · 0 评论 -
iOS常用加密方法
iOS常用加密方法(aes、md5、base64) 1、AES加密NSData+AES.h文件 // // NSData-AES.h // Smile // // Created by 周 敏 on 12-11-24. // Copyright (c) 2012年 BOX. All rights re原创 2016-09-12 13:27:58 · 299 阅读 · 0 评论 -
UISearchBar介绍
UISearchBar介绍属性作用UIBarStyle barStyle控件的样式id delegate设置控件的委托NSString *text控件上面的显示的文字NSString *prompt显示在顶部的单行文字,通常作为一个提示行NSString *p原创 2016-09-12 13:31:29 · 331 阅读 · 0 评论 -
iOS PanoramaGL(全景展示)用法及集成中的那些坑
因项目需要浏览全景照片,故了解了一下PanoramaGL,不得不说很强大,但可惜现在没有维护更新了所以有很多坑点,为了大家能不掉到坑里所以将遇到的坑点一一列出,希望能有所帮助,总结的不好还请大家多多指教。坑点一:只能在MRC环境下运行,所以要将Build Settings中的Objective-c Automatic Reference Counting设置为NO坑点二原创 2017-07-17 17:20:03 · 1125 阅读 · 0 评论 -
ECharts属性设置
theme = { // 全图默认背景 // backgroundColor: ‘rgba(0,0,0,0)’,// 默认色板color: ['#ff7f50','#87cefa','#da70d6','#32cd32','#6495ed', '#ff69b4','#ba55d3','#cd5c5c','#ffa500','#40e0d0', '#1e原创 2017-11-16 17:00:54 · 1167 阅读 · 0 评论 -
iOS开发之第三方分享QQ分享实现
分享第三方分享之QQ分享各种坑的总结:1. 分享老是提示未注册QQ,解决办法就是在程序已启动,就向QQ进行授权。代码如下 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[Tencent原创 2016-09-12 13:19:17 · 3482 阅读 · 0 评论 -
iOS判断字符串内容是否全部为 空格
//判断内容是否全部为空格 yes 全部为空格 no 不是+ (BOOL) isEmpty:(NSString *) str { if(!str) { return true; }else { //A character原创 2016-09-12 13:17:05 · 2646 阅读 · 0 评论 -
iOS:16进制转UIColor
UIColor+ZXLacy.h#import@interface UIColor (ZXLazy)+ (UIColor *)colorWithRed:(NSInteger)red green:(NSInteger)green blue:(NSInteger)blue;+ (UIColor *)colorWithH原创 2016-09-12 12:48:06 · 429 阅读 · 0 评论 -
iOS自定义实现日历控件
SZCalendarPicker.h#import@interface SZCalendarPicker : UIView@property (nonatomic , strong) NSDate *date;@property (nonatomic , strong) NSDate *today;@property (n原创 2016-09-12 12:56:36 · 1098 阅读 · 0 评论 -
iOS蓝牙控制模型
YBBluetooth.h#import#import@class YBBluetooth;@protocol YBBluetoothDelegate@optional - (void)bluetooth:(YBBluetooth *)bluetooth didDiscoverPeripher原创 2016-09-12 13:00:01 · 933 阅读 · 0 评论 -
iOS图片轮播
YBImageLoop.h#import#import@interface YBImageLoop : NSObject@property (nonatomic ,strong)NSArray *imageArray; //图片名字数组@property (nonatomic ,strong)UIPageControl *pageCo原创 2016-09-12 13:01:01 · 300 阅读 · 0 评论 -
iOS UIFont 字体名字大全
Font Family: American TypewriterFont: AmericanTypewriterFont: AmericanTypewriter-BoldFont Family: AppleGothicFont: AppleGothicFont Family: ArialFont: ArialMTFont: Arial-BoldMTFont:原创 2016-09-12 13:03:05 · 1687 阅读 · 0 评论 -
iOS开发之检查更新
iOS设备检查更新版本:#pragma mark - 检查更新- (void)checkUpdateWithAPPID:(NSString *)APPID{ //获取当前应用版本号 NSDictionary *appInfo = [[NSBundle mainBundle] infoDictionary]; NS原创 2016-09-12 13:09:09 · 408 阅读 · 0 评论 -
iOS常用宏定义
//获取当前屏幕的宽高#define kScreenW [[UIScreen mainScreen] bounds].size.width#define kScreenH [[UIScreen mainScreen] bounds].size.height //判断当前系统版本#define iOS9 ([[[UIDevice currentDevice]原创 2016-09-12 13:15:21 · 208 阅读 · 0 评论 -
iOS 打开、关闭闪光灯
-(void)flashLightClick { AVCaptureDevice * device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; if (device.torchMode == AVCaptureTorchModeOff) {原创 2016-09-12 13:16:25 · 1089 阅读 · 0 评论 -
iOS 检查App版本
#define DISPATCH_QUEUE_PRIORITY_HIGH 2NSString *setAppStoreURL = nil;- (void)checkNewAppVersion:(void(^)(BOOL newVersion, NSString *version))completion { NSDictionary *bundleInfo = [[NSBundle mainB...原创 2018-02-08 14:37:28 · 415 阅读 · 0 评论