自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 资源 (4)
  • 收藏
  • 关注

原创 Swift项目真机调试报错dyld: Library not loaded: @rpath/libswiftCore.dylib

解决问题的网址:stackoverflow使用Xcode7.3 真机运行 swift 项目的时候报错:dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /var/containers/Bundle/Application/xxx/abc.app/abc Reason: no suitable

2016-06-08 09:37:00 2233

原创 iOS Plus屏幕 AlerController报错

使用UIAlertController 在6P/6sP屏幕时报错2016-06-02 10:03:27.023 app[1581:584039] the behavior of the UICollectionViewFlowLayout is not defined because:2016-06-02 10:03:27.023 app[1581:584039] the item heig

2016-06-02 10:40:01 541

原创 iOS限制textfield输入两位小数逻辑思维步骤记录(Swift)

先贴代码,逻辑思维在下面。import UIKitclass ViewController: UIViewController ,UITextFieldDelegate{ var textField:UITextField! var isFirst = true var rangePoint:NSRange! override func

2016-03-14 11:00:31 1705

原创 Swift监听屏幕旋转

NSNotificationCenter.defaultCenter().addObserver(self, selector: "receiverNotification", name: UIDeviceOrientationDidChangeNotification, object: nil)func receiverNotification(){ let orie

2016-03-07 16:32:57 3952

原创 iOS3D-Touch开发之Home Screen Quick Actions(Swift)

func creatShortcutItem() { let item1 = UIApplicationShortcutItem(type: "Shortcut1", localizedTitle: "搜索", localizedSubtitle: "此处可以搜索", icon:UIApplicationShortcutIcon(type: UIApplicationShortcu

2016-03-04 17:50:49 517

原创 iOS3D-Touch开发之Home Screen Quick Actions(Ocjective-C)

通过主屏幕的应用Icon,我们可以用3D Touch呼出一个菜单,进行快速定位应用功能模块相关功能的开发。这是在UIApplicationShortcutItems中添加多个item(静态标签)在Appdelegate.m 中- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(N

2016-03-04 17:17:01 476

原创 引用CYLTabBarController记录

github地址:https://github.com/ChenYilong/CYLTabBarController在oc中引用: 创建TabBarViewController在.h文件中:#import #import #import "CYLTabBarController.h"@interface TabBarViewController : NSObject@p

2016-03-04 16:59:54 1783

原创 使用UIAlertController报错

使用UIAlertController报错 Presenting view controllers on detached view controllers is discouraged

2016-01-20 16:29:28 828

原创 xcode7替换SDK个人经验

解决网络问题:在Info.plist中添加NSAppTransportSecurity类型Dictionary。 在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES。Build Settings ->Build Options ->Enable Bitcode 设置为NO shareSDK :

2015-11-24 19:52:19 829

原创 iOS限制textfield输入两位小数

//限制输入两位小数- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { NSCharacterSet *cs; if ([textField isEqual:_textFieldM

2015-11-17 17:52:33 515

原创 FMDB使用

创建工程文件FMDBTry本次采用CocoaPods添加FMDB第三方库打开TerminalTerminal:cd 至FMDBTry文件夹内Terminal:pod search 'FMDB'选择合适的第三方库,例如:pod 'FMDB', '~> 2.5'Terminal:touch Podfile打开Podfile 将pod 'FMDB', '~> 2.

2015-11-02 15:33:46 343

原创 一些常用的工具类方法

//字符串文字的长度+(CGFloat)widthOfString:(NSString *)string font:(UIFont *)font height:(CGFloat)height{ NSDictionary * dict=[NSDictionary dictionaryWithObject: font forKey:NSFontAttributeName]; CGR

2015-10-29 14:00:49 394

原创 输出数组内中文字符

使用分类 在.m文件@end 之后加入@implementation NSMutableArray(MyChArr)- (NSString *)descriptionWithLocale:(id)locale{ NSMutableString *strM = [NSMutableString string]; [strM appendString:@"(\n"];

2015-10-26 14:33:05 640

原创 github 初次使用

Git 有三种状态,你的文件可能处于其中之一:已提交(committed)、已修改(modified)和已暂存(staged)。已提交表示数据已经安全的保存在本地数据库中。已修改表示修改了文件,但还没保存到数据库中。已暂存表示对一个已修改文件的当前版本做了标记,使之包含在下次提交的快照中。你可以使用 Git 来获取 Git的升级:$ git clone

2015-10-21 15:51:28 418

原创 基于TarBarController控制器的跳转方法

当前有很多app是基于TarBarController控制器的界面,在学习运用过程中,发现界面的跳转存在问题。这是首页的TableView的cell点击事件实现跳转界面方法。

2015-08-10 15:52:36 422

原创 oc三种传值方式:通知传值,代理传值,block传值

三种传值方式分别为:通知传值,代理传值,block传值通知和代理的区别(重点)1,代理可以给sender返回值;通知不能返回值2,通知代理量小,代理实现步骤比较繁琐3,通知是一对多/一对无的关系; 代理是一对一关系4,通知是一个监听者,效率较低.

2015-07-16 22:25:28 4559

JHUIImagePickerControllerForiOS

封装UIImagePickerController For iOS

2016-06-14

EasyUIImagePickerController

EasyUIImagePickerController for Swift GitHub:https://github.com/JonHory/JHUIImagePickerController 1.声明 var imagePickerController:JHImagePickerController? 2.初始化 //初始化方法一 // imagePickerController = JHImagePickerController() //初始化方法一的补充设置(若需要缓存时才设置) //设置是否缓存(默认为false) // imagePickerController?.isCaches = true //设置缓存id(当需要缓存时才设置) // imagePickerController?.identifier = "xx" //初始化方法二 imagePickerController = JHImagePickerController(isCaches: true, identifier: "abc") 3.设置代理 JHImagePickerControllerDelegate imagePickerController?.delegate = self 4. 选取图片来自相册 注意使用[weak self] 防止强引用 self.imagePickerController?.selectImageFromAlbumSuccess({[weak self] (imagePickerController) in if let strongSelf = self { strongSelf.presentViewController(imagePickerController, animated: true, completion: nil) } }, Fail: { //SVProgressHUD.showErrorWithStatus("无法获取照片权限") }) 选取图片来自相机 注意使用[weak self] 防止强引用 self.imagePickerController?.selectImageFromCameraSuccess({[weak self](imagePickerController) in if let strongSelf = self { strongSelf.presentViewController(imagePickerController, animated: true, completion: nil) } }, Fail: { //SVProgressHUD.showErrorWithStatus("无法获取相机权限") }) 5. 当未设置缓存或缓存identifier为空时返回该方法 func selectImageFinished(image: UIImage) { imageView.image = image self.dismissViewControllerAnimated(true, completion: nil) } 当设置了缓存,且输入缓存identifier时返回该方法(未设置缓存时可以不实现) func selectImageFinishedAndCaches(image: UIImage, cachesIdentifier: String, isCachesSuccess: Bool) { if isCachesSuccess == true { imageView.image = image } self.dismissViewControllerAnimated(true, completion: nil) } 6.根据identifier读取缓存图片(若读取失败,默认返回的image?.accessibilityIdentifier == "jhSurprise.jpg") let image = self.imagePickerController?.readImageFromCaches("abc") if image?.accessibilityIdentifier != "jhSurprise.jpg" { imageView.image = image }else { print("读取缓存照片失败,请检查图片identifier是否存在") imageView.image = image } 7.删除指定identifier的缓存图片(删除id:abc) self.imagePickerController?.removeCachesPictureForIdentifier("abc") 删除全部缓存图片 if self.imagePickerController?.removeCachesPictures() == true { print("删除全部缓存图片成功") }

2016-06-13

iOS工具类封装

获取字符串文字的长度 获取字符串文字的高度 获取今天的日期:年月日 邮箱/手机号码验证等

2015-10-29

iOS多级列表demo

本demo实现了类似qq列表,但能自行扩展的多级列表(demo中实现了4级列表)。满足每次点击cell才发起网络请求获取数据的思路(demo中在每次点击cell的时候创建并加载了更多的model)。满足自定义各级cell。

2015-10-21

空空如也

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

TA关注的人

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