- 博客(13)
- 收藏
- 关注
原创 iOS 获取APP名称 版本等
//获取所有信息字典NSDictionary *infoDictionary = [[NSBundlemainBundle] infoDictionary];NSString *executableFile = [infoDictionaryobjectForKey:(NSString *)kCFBundleExecutableKey];//获取项目名称
2017-09-21 11:16:52
2064
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
523
原创 tableview编辑状态下 默认选中cell之后 无法点击取消
tableview默认编辑状态下 默认选中cell之后 无法点击取消在willDisplayCell方法中设置cell.selected = yes;之后didSelectRowAtIndexPath和didDeselectRowAtIndexPath都无法调用解决方法: 在cell.selected = yes下添加方法[tableView selectRowAt
2017-09-05 14:02:55
1566
原创 label设置不同颜色 不同字体
NSMutableAttributedString *noteStr = [[NSMutableAttributedStringalloc] initWithString:@"我的应用 (按住拖动调整排序)"];NSRange grayRange =NSMakeRange([[noteStr string] rangeOfString:@"(按住拖动调整排序)"].loca
2017-08-08 10:56:27
1167
原创 iOS 日期 周几
NSDate*date = [NSDatedate]; NSCalendar*calendar = [NSCalendarcurrentCalendar]; NSDateComponents*comps; comps =[calendar components:NSCalendarUnitWeekdayfromDate:date];
2017-08-02 08:28:59
407
原创 去掉导航栏下面的黑线
//去除导航栏透明并删除黑线 self.navigationController.navigationBar.clipsToBounds=YES; self.navigationController.navigationBar.translucent = NO;
2017-07-13 16:32:20
639
原创 tableView组间距
//session头间距- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ return20;}//去掉session的headerview粘性- (void)scrollViewDidScroll:(UIScr
2017-07-12 17:08:32
578
原创 引导页
#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
210
原创 监听键盘
- (void)viewDidLoad { [superviewDidLoad]; [selflayoutScreens]; [[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(keyboardWillShow:)name:UIKeyboard
2017-07-12 08:14:26
236
原创 倒计时
- (void)viewDidLoad { [superviewDidLoad]; CGFloat btnW =60; CGFloat btnH =30; _countBtn = [[UIButtonalloc] initWithFrame:CGRectMake(ScreenW - btnW - 2
2017-07-10 10:56:22
202
原创 iOS 跳转到透明视图控制器
跳转前设置透明: dataVC.view.backgroundColor=[UIColorcolorWithRed:0green:0blue:0alpha:0.5]; [selfpresentViewController:dataVCanimated:NOcompletion:nil];在跳转后的视图控制器设置:
2017-06-19 10:57:00
433
原创 iOS 设置某个ViewController可以旋转
//支持横屏设置- (BOOL)shouldAutorotate{ returnYES;}-(UIInterfaceOrientationMask)supportedInterfaceOrientations{ returnUIInterfaceOrientationMaskAll;}
2017-06-16 16:52:31
817
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人