- 博客(9)
- 收藏
- 关注
原创 获取appdelegate对象
一般系统需要一些全局变量的时候直接在AppDelegate里面定义就好 在文件中导入#import "AppDelegate.h"头文件 AppDelegate * appDelegate = (AppDelegate*)[UIApplicationsharedApplication].delegate; 现在就可以获取AppDelegate中的所有成员变
2016-12-05 23:18:04
463
原创 标签添加中划线
出现场景:商品打折,原价和打折之后的价格同时出现,这时原价需要打下划线或者中划线 self.oldPriceLabel.text = @"99999.9"; NSString *textStr = [NSString stringWithFormat:@"%@", self.oldPriceLabel.text]; //中划线
2016-10-22 13:10:00
765
原创 隐藏tabbar和显示tabbar
//隐藏tabbar - (void)hideTabBar { if (self.tabBarController.tabBar.hidden == YES) { return; } UIView *contentView; if ( [[self.tabBarController.view.subviews
2016-10-20 13:39:20
1137
原创 MJRefresh的使用
-(void)viewWillAppear:(BOOL)animated { // 马上进入刷新状态 [self.homeTableView.mj_header beginRefreshing]; } 下拉刷新01-默认 self.homeTableView.mj_header = [MJRefreshNormalHeader heade
2016-10-13 20:40:25
729
原创 协议传值
Controller1: @interface FiveViewController ()SixViewControllerDelegate> - (IBAction)btnClick:(id)sender { SixViewController *six = [[SixViewController alloc]init]; six.delegat
2016-10-10 13:52:07
202
原创 方法传值
Controller1: - (IBAction)btnClick:(id)sender { NSString *code = _DMTextField.text; FouthViewController *fouth = [[FouthViewController alloc]initWithValue:code]; [se
2016-10-10 13:48:18
195
原创 通知中心传值
通知中心传值: controller1: -(void)btnClick:(UIButton *)btn { OneViewController *oVC = [[OneViewController alloc]init]; [self.navigationController pushViewController:oVC animated:Y
2016-10-10 13:25:17
226
原创 视图间切换的时候的动画效果
push出来的时候: MainView *nextView=[[MainView alloc] init]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:
2016-09-27 09:41:10
229
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅