自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 iOS 获取APP名称 版本等

//获取所有信息字典NSDictionary *infoDictionary = [[NSBundlemainBundle] infoDictionary];NSString *executableFile = [infoDictionaryobjectForKey:(NSString *)kCFBundleExecutableKey];//获取项目名称

2017-09-21 11:16:52 2011 1

原创 循环创建btn+使用imageEdgeInsets约束+设置图片大小

//设置btn的图片标题位置-(void)addBtnsWithImages:(NSArray *)images btnTitles:(NSArray *)titles{    CGRect frame = self.containerView.frame;    self.imageArray = images;    self.titleArra

2017-09-20 11:27:19 488

原创 tableview编辑状态下 默认选中cell之后 无法点击取消

tableview默认编辑状态下 默认选中cell之后 无法点击取消在willDisplayCell方法中设置cell.selected = yes;之后didSelectRowAtIndexPath和didDeselectRowAtIndexPath都无法调用解决方法: 在cell.selected = yes下添加方法[tableView selectRowAt

2017-09-05 14:02:55 1512

原创 label设置不同颜色 不同字体

NSMutableAttributedString *noteStr = [[NSMutableAttributedStringalloc] initWithString:@"我的应用 (按住拖动调整排序)"];NSRange grayRange =NSMakeRange([[noteStr string] rangeOfString:@"(按住拖动调整排序)"].loca

2017-08-08 10:56:27 1100

原创 iOS 日期 周几

NSDate*date = [NSDatedate];    NSCalendar*calendar = [NSCalendarcurrentCalendar];    NSDateComponents*comps;    comps =[calendar components:NSCalendarUnitWeekdayfromDate:date];

2017-08-02 08:28:59 362

原创 去掉导航栏下面的黑线

//去除导航栏透明并删除黑线    self.navigationController.navigationBar.clipsToBounds=YES;    self.navigationController.navigationBar.translucent = NO;

2017-07-13 16:32:20 605

原创 tableView组间距

//session头间距- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{    return20;}//去掉session的headerview粘性- (void)scrollViewDidScroll:(UIScr

2017-07-12 17:08:32 542

原创 引导页

#import "WPLIntroducePageView.h"#define ScreenW [UIScreen mainScreen].bounds.size.width#define ScreenH [UIScreen mainScreen].bounds.size.height@interfaceWPLIntroducePageView() UISc

2017-07-12 09:40:33 174

原创 监听键盘

- (void)viewDidLoad {    [superviewDidLoad];    [selflayoutScreens];    [[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(keyboardWillShow:)name:UIKeyboard

2017-07-12 08:14:26 203

原创 倒计时

- (void)viewDidLoad {    [superviewDidLoad];        CGFloat btnW =60;        CGFloat btnH =30;        _countBtn = [[UIButtonalloc] initWithFrame:CGRectMake(ScreenW - btnW - 2

2017-07-10 10:56:22 178

原创 屏幕旋转适配问题

-(void)viewWillLayoutSubviews每次屏幕旋转都会调用这个方法 可以在这里面更新约束

2017-06-20 09:25:41 285

原创 iOS 跳转到透明视图控制器

跳转前设置透明:        dataVC.view.backgroundColor=[UIColorcolorWithRed:0green:0blue:0alpha:0.5];        [selfpresentViewController:dataVCanimated:NOcompletion:nil];在跳转后的视图控制器设置:

2017-06-19 10:57:00 360 1

原创 iOS 设置某个ViewController可以旋转

//支持横屏设置- (BOOL)shouldAutorotate{    returnYES;}-(UIInterfaceOrientationMask)supportedInterfaceOrientations{    returnUIInterfaceOrientationMaskAll;}

2017-06-16 16:52:31 768

空空如也

空空如也

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

TA关注的人

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