自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 资源 (1)
  • 问答 (1)
  • 收藏
  • 关注

原创 iOS API生成工具

在IOS 开发的过程中需要程序员写好API 方便别的同事和后期的维护, 但是生成API 是有规律的,所以这个工具是生成API的一个脚本, 但有的公司的API说明格式有可能和我这不太一样,这个工具是提供一些实现思路。 文件包里面有一些我们的API接口说明,方便测试使用 本工具以参考为准,提供一些实现思路。以上为我朋友帮忙整理 详情请看搜索页

2017-03-31 15:46:46 501

转载 iOS NEHotspotHelper使用

一、简介首先放上苹果官方文档:https://developer.apple.com/reference/networkextension/nehotspothelperNEHotspotHelper 是 NetworkExtension.framework中与wifi连接相关的一个功能类。1.+ supportedNetworkInterfaces 可以获取到当前

2017-03-31 15:33:22 3039

翻译 iOS数据 分割代码

//可以将大的数据分割为指定大小的小数据块,方便传输用~  ////////////////////#define A_RECEIVE 2500000    NSData *videoData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:theImagePath]];    NSLog(@"视

2015-07-13 15:37:59 879

原创 button 设置图片文字上下

    func setbuttonMiddle(btn:UIButton){        if btn.imageView == nil || btn.titleLabel == nil{return}                let  imgW : CGFloat = btn.imageView!.frame.size.width        let  imgH : ...

2018-10-16 10:17:30 2676

转载 TCP三次握手

TCP(Transmission Control Protocol) 传输控制协议TCP是主机对主机层的传输控制协议,提供可靠的连接服务,采用三次握手确认建立一个连接:位码即tcp标志位,有6种标示:SYN(synchronous建立联机) ACK(acknowledgement 确认) PSH(push传送) FIN(finish结束) RST(reset重置) URG(urge

2017-04-05 10:39:09 297

转载 iOS获取Wi-Fi名字

- (NSString *)getWifiNamed {    NSArray *ifs = (NSArray *)CNCopySupportedInterfaces();    if (!ifs) {        returnnil;    }    NSString *WiFiName =nil;    for (NSString

2017-03-31 15:31:31 567

原创 iOS JSON转字典

#pragma mark JSON转字典+(NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString{    if (jsonString ==nil) {        returnnil;    }        NSData *jsonData = [jsonS

2017-03-31 15:29:22 1260

原创 iOS获取IP地址

- (NSString *)getIPAddress{    NSString *address =@"error";    structifaddrs *interfaces = NULL;    structifaddrs *temp_addr = NULL;    int success =0;    //retrieve th

2017-03-31 15:28:19 254

原创 iOS 键盘上边按钮

uitextfield * rightField; rightField.inputAccessoryView =_buttonView;-(void)textFieldDidBeginEditing:(UITextField *)textField{     _commitBtn.frame =CGRectMake(0,0, winsizeW,55 *

2016-08-18 10:46:22 309

原创 tabviewcell 左滑 自定义按钮

-(NSArrayUITableViewRowAction *>*)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath{    UITableViewRowAction * rowAction = [UITableViewRowActionrowActionWi

2016-08-15 16:26:17 693

原创 判断手机型号

首先导入  #import "sys/utsname.h"- (NSString*)deviceVersion{     structutsname systemInfo;    uname(&systemInfo);    NSString *deviceString = [NSStringstringWithCString:systemInfo.ma

2015-12-09 11:31:05 294

原创 iOS 本地存取图片

@interface ImageSaveHelper :NSObject/** *  将图片数组以arrayName存储 * *  @param array    图片数组,数组元素是UIImage *  @param nameArray图片名称数组,数组元素是NSString *  @param arrayName存储图片文件名称 */+(

2015-11-02 14:46:50 555

原创 tabviewcell 上次选中和这次选中

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{    NSInteger newRow = [indexPathrow];    NSInteger oldRow = (lastindexPath!=nil)?[lastindexPathrow]:

2015-10-22 11:38:37 2614

原创 nslog 判断打印的 那一行

#define NSLog(format, ...) do {      \fprintf(stderr, " %s\n",                                           \[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String],  \__LINE__, _

2015-09-01 10:59:39 274

原创 iOS 旋转动画

UIImageView * _loadingView = [[UIImageViewalloc]initWithFrame:CGRectMake(80,300, 50,50)];        _loadingView.image = [UIImageimageNamed:@"facial_features_green"];        [self.viewaddSu

2015-08-06 17:32:52 543

原创 md5 二进制数据

//二进制数据#import @interface NSData (Category)- (NSString*)md5;@end#import "NSData+Category.h"#import @implementation NSData (Category)- (NSString*)md5{    unsigned

2015-07-23 15:48:56 3138

原创 二进制存入文件格式为.mov

//    NSString* filePath = nil;//    NSArray* folders = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);//    filePath = [folders objectAtIndex:0];//    //    f

2015-07-23 09:54:25 1077

原创 iOS判断是否是中文或者英文

NSString * toBeString = [textField.text stringByReplacingCharactersInRange:range withString:string];    NSCharacterSet *nameCharacters = [[NSCharacterSet                                       char

2015-07-02 10:56:06 1811

原创 base64转码

-(NSString*)turBase64:(UIImage *)image{        NSMutableString *jsonString = [[NSMutableStringalloc] init];//    NSString *string=@"";            UIImage *IMAGE1=image ;        NSData *

2015-07-01 14:47:10 557

原创 uialertview 设置输入的位数限制

-(void)creatalter{    UIAlertView *alertview = [[UIAlertViewalloc]initWithTitle:@"请输入登录密码"message:nildelegate:selfcancelButtonTitle:@"取消"otherButtonTitles:@"确定",nil];    alertview.

2015-07-01 11:52:18 455

原创 textfield设置只能输入的字符长度

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string;{    if ([stringisEqualToString:@"\n"])    {        returnYES

2015-06-30 18:32:11 905

原创 iOS 得到系统的IP地址

#pragma mark--iOS 得到系统的IP地址- (NSString *)getIPAddress {    NSString *address =@"error";    structifaddrs *interfaces = NULL;    structifaddrs *temp_addr = NULL;    int success =0;    /

2015-06-30 10:12:58 263

原创 iOS 得到系统当前时间

#pragma mark--iOS得到系统当前时间-(NSString*)getCurentTime{    NSString* date;    NSDateFormatter* formatter = [[NSDateFormatteralloc]init];    [formatter setDateFormat:@"YYYY-MM-dd hh:mm:ss"];    da

2015-06-30 09:51:01 322

原创 iOS 如何 理解 代理

本人的iOS代理笔记攥写,有不对之处请指出

2015-06-29 10:47:56 246

翻译 iOS设计模式之单例模式

单例模式是iOS常用设计模式的一种。单利设计模式的作用是使得这个类的一个对象成为系统中的唯一的实现,因此需要用一种唯一的方法去创建这个对象,并返回这个对象的地址。那么,我们何时使用单利模式呢?1:类只能有一个实例,而且必须从一个为人熟知的访问点对其访问。2:这个唯一的实例只能通过子类化进行扩展,而且扩展对象不会破坏客户端代码。那么用oc如何实现单利模式呢?我们来创建一个MyIn

2015-06-26 11:24:26 283

API生成工具

在IOS 开发的过程中需要程序员写好API 方便别的同事和后期的维护, 但是生成API 是有规律的,所以这个工具是生成API的一个脚本, 但有的公司的API说明格式有可能和我这不太一样,这个工具是提供一些实现思路。 文件包里面有一些我们的API接口说明,方便测试使用 本工具以参考为准,提供一些实现思路。

2017-03-31

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

TA关注的人

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