自定义博客皮肤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 = [[NSBundle mainBundle] infoDictionary]; NSString *executableFile = [infoDictionary objectForKey:(NSString *)kCFBundleExecutableKey]; //获取项目名称

2017-09-21 11:16:52 2024 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 499

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

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

2017-09-05 14:02:55 1526

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

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

2017-08-08 10:56:27 1122

原创 iOS 日期 周几

NSDate*date = [NSDate date];     NSCalendar*calendar = [NSCalendar currentCalendar];     NSDateComponents*comps;     comps =[calendar components:NSCalendarUnitWeekday fromDate:date];

2017-08-02 08:28:59 369

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

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

2017-07-13 16:32:20 611

原创 tableView组间距

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

2017-07-12 17:08:32 548

原创 引导页

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

2017-07-12 09:40:33 180

原创 监听键盘

- (void)viewDidLoad {     [super viewDidLoad];     [self layoutScreens];     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboard

2017-07-12 08:14:26 207

原创 倒计时

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

2017-07-10 10:56:22 181

原创 屏幕旋转适配问题

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

2017-06-20 09:25:41 291

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

跳转前设置透明:         dataVC.view.backgroundColor=[UIColor colorWithRed:0 green:0 blue:0 alpha:0.5];         [self presentViewController:dataVC animated:NO completion:nil]; 在跳转后的视图控制器设置:

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

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

//支持横屏设置 - (BOOL)shouldAutorotate {     return YES; } -(UIInterfaceOrientationMask)supportedInterfaceOrientations {     return UIInterfaceOrientationMaskAll; }

2017-06-16 16:52:31 775

空空如也

空空如也

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

TA关注的人

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