自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 收藏
  • 关注

转载 iOS 可折叠Label

#import <UIKit/UIKit.h>@interface ActiveLabel : UILabel//记录行数@property (nonatomic , assign) int rows;//设置伸缩- (void)setTheContraction:(BOOL)whether;@end------------...

2018-06-13 14:11:00 230

转载 带输入框alertController的正确使用

UIAlertController *alertController = [UIAlertController alertControllerWithTitle:Localkey(@"Add the nickname") message:Localkey(@"Add the sensor's nickname") preferredStyle:UIAlertControllerStyle...

2018-04-28 13:41:00 199

转载 iOS 权限声明国际化

解决办法是在Info.plist中添加Privacy - Camera Usage Description和Privacy - Photo Library Usage Description。如果直接写在Info.plist中,则不能多语言显示提示,想要多语言提示,可以选中Info.plist文件在InfoPlist.strings(Base)中添加:/*权限声明*/NS...

2018-04-17 11:26:00 240

转载 快捷代码块写法

@property(nonatomic,strong)<#type#><#name#>选中代码 (同时长按alt键和鼠标左键)拖入code snippet转载于:https://www.cnblogs.com/fendoulushangdefenqing/p/8854192.html...

2018-04-16 09:53:00 79

转载 iOS block中不要使用实例变量

使用实例变量会造成页面不销毁转载于:https://www.cnblogs.com/fendoulushangdefenqing/p/8745770.html

2018-04-08 16:30:00 113

转载 iOS Xcode中对字符串批量修改

工具栏切换到搜索按钮-- >将Find切换为Replace转载于:https://www.cnblogs.com/fendoulushangdefenqing/p/8568141.html

2018-03-14 15:58:00 130

转载 You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletio...

解决方法:项目--> Capabilities --> Background Modes --> Background fetch & Remote notifications --> 选中转载于:https://www.cnblogs.com/fendoulushangdefenqing/p/8565249.html...

2018-03-14 09:51:00 685

转载 在点击tableview上的一个cell后弹出alert,会发现有延迟的问题或者点击没有反应,随便再点击一下才会弹出...

将弹出的代码直接放到主线程执行dispatch_async(dispatch_get_main_queue(), ^{ [self presentViewController:AlertView animated:YES completion:nil]; });转载于:https://www.cnblogs.com/fendoulushan...

2018-01-26 15:52:00 90

转载 iOS 四舍五入、进位、抹位 方法

1,四舍五入法float numberToRound; int result; numberToRound = 5.61; result = (int)roundf(numberToRound); NSLog(@"roundf(%.2f) = %d", numberToRound, result); //输出 roundf(5.61)...

2018-01-26 15:43:00 296

转载 xcode 打印数据不完整,只打印了一半问题

创建一个宏 把这段代码粘上去 在使用的地方调用就可以了#ifdef DEBUG#define NSLog(FORMAT, ...) fprintf(stderr, "%s:%zd\t%s\n", [[[NSString stringWithUTF8String: __FILE__] lastPathComponent] UTF8String], __LINE__, [[NSStr...

2018-01-26 15:38:00 304

转载 解决xcode输出是中文的Unicode码问题

NSData *jsonData = [NSJSONSerialization dataWithJSONObject:后台返回的json options:NSJSONWritingPrettyPrinted error:nil];NSString *jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8St...

2018-01-26 15:36:00 205

转载 自定义 switchBtn

//// CustomSwitchBtn.h// IntelligentWaterValve//// Created by lxl on 2017/12/22.// Copyright © 2017年 komlin. All rights reserved.//#import <UIKit/UIKit.h>typ...

2018-01-17 17:15:00 89

转载 label设置行间距,换行剧中方法

// 创建一个LabelUILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(50, 100, 300, 300)];// 设置为多行显示label.numberOfLines = 0;NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagrap...

2018-01-16 15:03:00 374

转载 iOS UITextField 切圆角后光标缩进方法

UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 15 * ScalW, 30 * ScalW)]; self.passwordTF.leftView = view; self.passwordTF.leftViewMode = UITextFieldViewModeAlways;转载于:...

2018-01-02 10:22:00 135

转载 ios 自定义SwitchBtn

//// CustomSwitchBtn.h// IntelligentWaterValve//// Created by lxl on 2017/12/22.// Copyright © 2017年 komlin. All rights reserved.//#import <UIKit/UIKit.h>typedef v...

2017-12-22 16:30:00 89

转载 IOS ShareSDK实现分享——微信分享 本地视频分享

NSArray* imageArray = @[[UIImage imageNamed:@"icon.png"]]; if (imageArray) { NSMutableDictionary *shareParams = [NSMutableDictionary dictionary]; [shareParams SS...

2017-12-08 14:42:00 555

转载 UIAlertController简单封装

//// LXLAlterView.h// MoreIn//// Created by 李学亮 on 2017/5/15.// Copyright © 2017年 person. All rights reserved.//#import <UIKit/UIKit.h>typedef void(^cancelBlock)(U...

2017-05-24 16:38:00 103

转载 iOS xib设置控件自身的宽高比,或同其他控件的宽高比

按住control,鼠标在控件上拖动(其他控件时,拖线到其他控件),选择aspecr ratio,然后修改比例即可。转载于:https://www.cnblogs.com/fendoulushangdefenqing/p/5858871.html...

2016-09-10 10:14:00 498

转载 iOS 界面多次present后,dismiss到指定的界面方法

- (void)backAction:(UIButton *)sender{ UIViewController *vc =self.presentingViewController;//ReadBookController要跳转的界面 while (![vc isKindOfClass:[ReadBookController class]]) ...

2016-09-08 17:21:00 469

转载 iOS 判断用户设置密码是否太简单(如 123,456,111)

- (BOOL)validateLianxu:(NSString *)passWord{ NSString *last = @""; int sub = -1; for (int i = 0; i< passWord.length; i++) { NSString *str = [passWord substringWithRange...

2016-08-19 18:01:00 157

转载 iOS中对于多个UIButton,如何选中其中一个而另其他的选中状态为NO?

1.设置全局 的self.starButton作为中间变量//下面方法是多个Button公用的点击事件响应方法(可用tag值区分不同Button点击事件)2.- (void)click:(UIButton*)button{ if(button!=self.starButton){ self.starButton.selected=NO;...

2016-07-25 15:37:00 119

转载 IOS导入TFF 字体文件使用自定义字体(特殊字体)

转载于:https://www.cnblogs.com/fendoulushangdefenqing/p/5683716.html

2016-07-19 10:20:00 179

转载 iOS 实现状态栏(电池条)和导航条的背景颜色透明

一、此方法可以实现隐藏状态栏,但是整个项目的都会被隐藏掉(不好用)1.在plist文件中加入 View controller-based status bar appearance 设置为 NO2.[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:NO];二、亲测好用...

2016-06-22 16:10:00 153

空空如也

空空如也

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

TA关注的人

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