- 博客(9)
- 收藏
- 关注
原创 获取appdelegate对象
一般系统需要一些全局变量的时候直接在AppDelegate里面定义就好在文件中导入#import "AppDelegate.h"头文件 AppDelegate * appDelegate = (AppDelegate*)[UIApplicationsharedApplication].delegate;现在就可以获取AppDelegate中的所有成员变
2016-12-05 23:18:04
406
原创 标签添加中划线
出现场景:商品打折,原价和打折之后的价格同时出现,这时原价需要打下划线或者中划线 self.oldPriceLabel.text =@"99999.9"; NSString *textStr = [NSStringstringWithFormat:@"%@",self.oldPriceLabel.text]; //中划线
2016-10-22 13:10:00
697
原创 隐藏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
1045
原创 MJRefresh的使用
-(void)viewWillAppear:(BOOL)animated{ // 马上进入刷新状态 [self.homeTableView.mj_headerbeginRefreshing];}下拉刷新01-默认self.homeTableView.mj_header = [MJRefreshNormalHeaderheade
2016-10-13 20:40:25
663
原创 协议传值
Controller1:@interface FiveViewController ()SixViewControllerDelegate>- (IBAction)btnClick:(id)sender { SixViewController *six = [[SixViewControlleralloc]init]; six.delegat
2016-10-10 13:52:07
160
原创 方法传值
Controller1:- (IBAction)btnClick:(id)sender { NSString *code =_DMTextField.text; FouthViewController *fouth = [[FouthViewControlleralloc]initWithValue:code]; [se
2016-10-10 13:48:18
151
原创 通知中心传值
通知中心传值:controller1:-(void)btnClick:(UIButton *)btn{ OneViewController *oVC = [[OneViewControlleralloc]init]; [self.navigationControllerpushViewController:oVC animated:Y
2016-10-10 13:25:17
168
原创 视图间切换的时候的动画效果
push出来的时候:MainView *nextView=[[MainView alloc] init]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:
2016-09-27 09:41:10
174
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人