加载中
制作cocoapods第三方库

创建仓库 克隆到本地,创建项目到仓库 创建描述文件 GWLPodTest.podspes pod spec create GWLPodTest 编辑GWLPodTest.podspes文件,描述文件参数描述及更多参数可参考官网文档。 Pod::Spec....

05/06 15:20
5
计算UILabel的高度

UILabel *label = [[UILabel alloc] init]; label.numberOfLines = 0; label.lineBreakMode = NSLineBreakByWordWrapping; label.textAlignment = NSTextAlignmentLeft; label.text = @"1234...

02/28 22:09
0
UIWebView添加头视图

- (void)setupHeader { UIView *header = [[UIView alloc] init]; header.backgroundColor = [UIColor orangeColor]; header.frame = CGRectMake(0, -100, screenWidth, 100); [self.mainWe....

02/28 21:08
0
本地消息通知

AppDelegate.m #import "AppDelegate.h" #import <UserNotifications/UserNotifications.h> @interface AppDelegate () <UNUserNotificationCenterDelegate> @end @implementation AppDelega...

01/17 15:09
0
The data couldn’t be read because it isn’t in the correct format.

项目运行出现如下错误 原因为所提示的plist文件冲突 根据提示文件路径,找到plist文件,打开文件,解决冲突即可

01/15 16:31
1
Xcode不出错误提示,Indexing | Processing files

使用xcode的时候突然给不出错误提示了,只是 Indexing | Processing files,重启xcode或关机依然没有效果 解决方法: 在 ~/Library/Developer/Xcode/DerivedData 目录下删除所有的内容,然后...

01/11 11:28
100
父视图透明度对子视图无效设置

self.maskView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.0]; 原图 设置后效果(0.1) 设置后效果(0.0)......

2018/12/25 15:00
0
图片拉伸

stretchableImageWithLeftCapWidth: topCapHeight: @interface UIImage(UIImageDeprecated) // use resizableImageWithCapInsets: and capInsets. - (UIImage *)stretchableImageWithLeftCap...

2018/12/25 14:26
0
charts 柱状图、饼图

柱状图 #import "ViewController.h" #import <Charts/Charts-Swift.h> #import <ChartsRealm/ChartsRealm-Swift.h> #import <Masonry/Masonry.h> #define visibleXRangeMaximum 10 @interfac...

2018/12/12 16:14
38
iOS - 关键字崩溃

tableview崩溃在此处 ...Cell *cell = [tableView dequeueReusableCellWithIdentifier:ID]; *** Assertion failure in -[UITableView _dequeueReusableViewOfType:withIdentifier:], /Build...

2018/12/11 15:17
29
iOS - cocoapods/pod

platform :ios, '9.0' #版本 use_frameworks! #OC和swift混编时添加 inhibit_all_warnings! #消除CocoaPods警告 target ‘test’ do pod 'FMDB' pod 'AFNetworking', '~> 3.1.0' pod 'React....

2018/09/29 17:51
0
iOS开发 - 根据颜色改变图片的颜色

- (UIImage *)colorizeImage:(UIImage *)baseImage withColor:(UIColor *)theColor { // UIGraphicsBeginImageContext(baseImage.size); // CGRect area = CGRectMake(0, 0, baseImage.size....

iOS
2018/05/17 14:40
30
NSError

NSError *error = [[NSError alloc] initWithDomain:@"testDomain" code:9998 userInfo:@{NSLocalizedDescriptionKey:@......

2018/04/20 10:12
18
iOS开发 - 在UITableView上添加长按手势

UILongPressGestureRecognizer *lpgr = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)]; lpgr.minimumPressDuration = 1.0; lpgr.delegat...

iOS
2018/03/15 10:01
7
iOS 线程锁@synchronized

#import "ViewController.h" @interface ViewController () /// 销售员01 @property (strong, nonatomic) NSThread *thread01; /// 销售员02 @property (strong, nonatomic) NSThread *thre...

iOS
2018/02/28 16:56
1
iOS 计算时间差CFAbsoluteTimeGetCurrent()

CFTimeInterval begin = CFAbsoluteTimeGetCurrent(); CFTimeInterval end = CFAbsoluteTimeGetCurrent(); NSLog(@"%f",end - begin);......

iOS
2018/02/28 16:38
90
iOS-FMDB

#import <Foundation/Foundation.h> #import <FMDatabase.h> #import "MyModel.h" @interface FMDBManager : NSObject { FMDatabase *_dataBase; } +(instancetype)shareInstance; - (BOOL)i...

2017/12/18 16:33
5
iOS-<UITabBarControllerDelegate> 代理不执行

出现如下代理不执行的情况 - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { } - (BOOL)tabBarController:...

iOS
2017/11/28 15:50
59
iOS开发 - js oc相互调用

首先导入 JavaScriptCore.framework 框架 #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import <JavaScriptCore/JavaScriptCore.h> @protocol ServerJSProtocol <JSExport> ...

iOS
2017/11/28 13:21
27
iOS-根据图片url获取网络图片尺寸

导入 #import <UIKit/UIKit.h> @interface UIImage (ImgSize) /** * 根据图片url获取网络图片尺寸 */ + (CGSize)getImageSizeWithURL:(id)URL; @end #import "UIImage+ImgSize.h" #import <...

iOS
2017/11/23 09:48
2

没有更多内容

加载失败,请刷新页面

返回顶部
顶部