自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

targetcloud

https://github.com/targetcloud thanks your star

  • 博客(21)
  • 收藏
  • 关注

原创 protobuf入门到高手教程

protobuf入门教程全称Protocol Buffers,简称GPB、PB ,是QQ等IM采用的协议,比XML、XMPP(环信)、JSON、结构体等所有传输效果都高的一种传输协议,由谷歌发明,其效率一般是XML XMPP的20倍以上,JSON的10倍以上,是一种游戏中普遍采用的IM消息协议,所以你非常有必要认真读一下本博文的入门教程,并运行作

2017-03-28 07:55:04 10423

原创 解压缩

//// ViewController.swift// ziptest//// Created by targetcloud on 2017/3/29.// Copyright © 2017年 targetcloud. All rights reserved.//import UIKitimport Alamofireimport SSZipArchiveclass

2017-03-29 21:13:32 624

原创 swift3播放webp

//// ViewController.swift// yywebimagetest//// Created by targetcloud on 2017/3/29.// Copyright © 2017年 targetcloud. All rights reserved.//import UIKitimport YYWebImageclass ViewControl

2017-03-29 17:37:00 1198

原创 swift3播放本地GIF图

import UIKitimport ImageIOclass ViewController: UIViewController { @IBOutlet weak var imageView: UIImageView! override func viewDidLoad() { super.viewDidLoad()

2017-03-29 01:13:21 2505

原创 swift3面向协议编程实现Alamofire封装

1、原先的实现过程我们一般使用的是Alamofire,对其单例封装//// NetworkTools.swift//// Created by targetcloud on 2017/3/26.// Copyright © 2017年 targetcloud. All rights reserved.////原来1import UIKitimport Alamofi

2017-03-27 00:11:30 4649

原创 swift3使用协议和泛型简化UITableView的使用(续)多种类型的cell注册

1、协议//// ReusableCell.swift// reusecell//// Created by targetcloud on 2017/3/26.// Copyright © 2017年 targetcloud. All rights reserved.//import UIKitprotocol ReusableCell : class{ s

2017-03-26 05:06:48 1848

原创 swift3使用协议和泛型简化UITableView的使用

普通我们使用UITableView时我们总是要定义一个ID,然后注册tableview.register(cellClass: AnyClass?, forCellReuseIdentifier: String)tableView.dequeueReusableCell(withIdentifier: String, for: IndexPath)定

2017-03-26 04:05:33 923

原创 swift3 用协议实现从XIB加载view

如我们实现了一个类TGEmoticonInputV,这个类是UIView,同时对应的XIB(同名)也已经创建以前我们要加载这个View的做法是let v = Bundle.main.loadNibNamed("TGEmoticonInputV", owner: nil, options: nil)?.first as! TGEmoticonInputV或者是let nib = UI

2017-03-25 21:50:47 8974

原创 swift3实现瀑布流

//// ViewController.swift// TGWaterfall//// Created by targetcloud on 2017/3/23.// Copyright © 2017年 targetcloud. All rights reserved.//import UIKitprivate let kCollectionVCellID = "kCol

2017-03-24 06:41:38 690

原创 JS调用swift相册

window.location.href = 'tg:///openCamera'在JS中用自己定义的协议头来协作JS和swiftcssbody{}img{ width:100%;}#mainTitle{ text-align:center; font-size:20px; margin-top:20px; margin-bott

2017-03-24 04:54:54 706

原创 swift runtime应用 2行代码完成UINavigationController全屏pop手势

interactivePopGestureRecognizer

2017-03-24 03:58:42 960

原创 swift3自定义导航条(四)完结

https://github.com/targetcloud/TGPageView.git先Start!!!根据需要可以自行组合,你需要做的就是设置titles 和 style!

2017-03-24 00:30:46 1091

原创 swift3自定义导航条(三)

//// TGPageView.swift// TGPageView//// Created by targetcloud on 2017/3/22.// Copyright © 2017年 targetcloud. All rights reserved.//import UIKitclass TGPageView: UIView { fileprivate

2017-03-23 20:49:00 894

原创 swift3自定义导航条(二)颜色处理

//// UIColor+extension.swift// TGPageView//// Created by targetcloud on 2017/3/22.// Copyright © 2017年 targetcloud. All rights reserved.//import UIKitextension UIColor{ class func ra

2017-03-23 04:00:17 502

原创 swift3自定义导航条(一)

//// TGPageStyle.swift// TGPageView//// Created by targetcloud on 2017/3/22.// Copyright © 2017年 targetcloud. All rights reserved.//import UIKitclass TGPageStyle { var titleViewHeigh

2017-03-23 03:55:12 631

原创 选择照片

#import "ViewController.h"@interface ViewController () @property (weak, nonatomic) IBOutlet UIImageView *imageView;@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoa

2017-03-15 18:41:43 299

原创 选择多图时显示选择序号

1、在info.plist加入NSPhotoLibraryUsageDescription2、pods导入   pod 'CTAssetsPickerController'3、代码中 需要有这一句picker.showsSelectionIndex = YES;完整代码//// ViewController.m// CTAssetsPickerDemo///

2017-03-15 02:32:43 944

原创 使用Photos保存图片到自定义相册

//// TGSeeBigPicVC.m//// Created by targetcloud on 2017/3/14.// Copyright © 2017年 targetcloud. All rights reserved.//#import "TGSeeBigPicVC.h"#import "TGTopicM.h"#import #import @interf

2017-03-14 18:12:00 1348

原创 WKWebView的使用,利用KVO

//// TGWebVC.h//// Created by targetcloud on 2017/3/7.// Copyright © 2017年 targetcloud. All rights reserved.//#import @interface TGWebVC : UIViewController@property (nonatomic, strong) NS

2017-03-07 22:14:02 1416

原创 自定义UITextField的Placeholder颜色的4种方法(attributedPlaceholder , KVC , Category , runtime)

class_getInstanceMethod method_exchangeImplementations objc_setAssociatedObjectobjc_getAssociatedObject

2017-03-07 16:57:23 883

原创 使用swift3创建自己的pod

1>注册这台MAC可以发布POD$pod trunk register targetcloud@163.com "targetcloud"[!] Please verify the session by clicking the link in the verification email that has been sent to targetcloud@163.com去

2017-03-03 19:03:10 1511

空空如也

空空如也

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

TA关注的人

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