ios一些开发中遇到的小知识点
2012-07-27 12:40
260 查看
界面重下到上弹出,
弹出方法
addResumes为要弹出的画面对象
addResumes=[[AddResumes
alloc]initWithNibName:@"AddResumes"
bundle:nil];
// [self.navigationController pushViewController:addResumes animated:YES];
nav=[[UINavigationController
alloc]initWithRootViewController:addResumes];
[self.navigationController
presentModalViewController:nav
animated:YES];
返回时调用方法
[self.navigationController
dismissModalViewControllerAnimated:YES];
这一对方法是将控制权转交给下个navigationcontroller控制,和左右不一样,左右是将目前界面往堆栈里面压,将新的界面添加进来
左右对应的方法为
[self.navigationController
pushViewController:resumeDetail
animated:YES];
[self.navigationController
popViewControllerAnimated:YES];
更多此类方法看api。
自定义navigation 按钮方法
UIBarButtonItem *rightbuttonitem=[[UIBarButtonItem
alloc]initWithImage:[UIImage
imageNamed:@"nav_btn_email.png"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(mailway)];
self.navigationItem.rightBarButtonItem=rightbuttonitem;
修改navigationtitle字体什么的,添加视图,想怎么改怎么改
UILabel *navtitle=[[UILabel
alloc]init];
[navtitle setFont:[UIFont
fontWithName:@"TimesNewRomanPS-BoldMT"
size:20]];
[navtitle setText:@"Objective"];
navtitle.textColor=[UIColor
whiteColor];
[navtitle setFrame:CGRectMake( -70, -13,
140, 25)];
navtitle.textAlignment=UITextAlignmentCenter;
[navtitle setBackgroundColor:[UIColor
clearColor]];
navtitle.shadowColor=[UIColor
darkGrayColor];
[navtitle setShadowOffset:CGSizeMake(-0.5, -1)];
UIView *myview=[[UIView
alloc]init];
[myview addSubview:navtitle];
[navtitle release];
[self.navigationItem
setTitleView:myview];
[myview release];
弹出方法
addResumes为要弹出的画面对象
addResumes=[[AddResumes
alloc]initWithNibName:@"AddResumes"
bundle:nil];
// [self.navigationController pushViewController:addResumes animated:YES];
nav=[[UINavigationController
alloc]initWithRootViewController:addResumes];
[self.navigationController
presentModalViewController:nav
animated:YES];
返回时调用方法
[self.navigationController
dismissModalViewControllerAnimated:YES];
这一对方法是将控制权转交给下个navigationcontroller控制,和左右不一样,左右是将目前界面往堆栈里面压,将新的界面添加进来
左右对应的方法为
[self.navigationController
pushViewController:resumeDetail
animated:YES];
[self.navigationController
popViewControllerAnimated:YES];
更多此类方法看api。
自定义navigation 按钮方法
UIBarButtonItem *rightbuttonitem=[[UIBarButtonItem
alloc]initWithImage:[UIImage
imageNamed:@"nav_btn_email.png"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(mailway)];
self.navigationItem.rightBarButtonItem=rightbuttonitem;
修改navigationtitle字体什么的,添加视图,想怎么改怎么改
UILabel *navtitle=[[UILabel
alloc]init];
[navtitle setFont:[UIFont
fontWithName:@"TimesNewRomanPS-BoldMT"
size:20]];
[navtitle setText:@"Objective"];
navtitle.textColor=[UIColor
whiteColor];
[navtitle setFrame:CGRectMake( -70, -13,
140, 25)];
navtitle.textAlignment=UITextAlignmentCenter;
[navtitle setBackgroundColor:[UIColor
clearColor]];
navtitle.shadowColor=[UIColor
darkGrayColor];
[navtitle setShadowOffset:CGSizeMake(-0.5, -1)];
UIView *myview=[[UIView
alloc]init];
[myview addSubview:navtitle];
[navtitle release];
[self.navigationItem
setTitleView:myview];
[myview release];
相关文章推荐
- ios开发一些零碎的知识点(一)
- iOS开发中经常遇到的一些问题
- IOS开发 IOS9.0上遇到的一些新问题
- 业务需要,IOS转到JAVA 安卓端开发,开始记录一些小知识点
- IOS开发的一些细微知识点
- ios 开发中遇到的一些问题
- ios开发原生的扫描二维码的实现以及限制扫描区域rectOfInterest遇到的一些坑
- cocos2d-x开发完iOS后改为Android遇到的一些问题
- Java小技能点汇总(一)<日常开发中遇到的一些小知识点-长期更新>
- iOS 开发,xcode7中用QQ授权登录遇到的一些问题 QQ登录不跳客户端
- IOS开发基础—关于uikit框架里面uiview类的一些知识点
- ios开发学习过程中遇到的一些问题
- 【汇总】iOS开发及Xcode使用中遇到的一些报错问题汇总
- iOS开发中使用protobuf遇到的一些问题
- ios开发原生的扫描二维码的实现以及限制扫描区域rectOfInterest遇到的一些坑
- iOS--开发文本输入框遇到的一些问题
- iOS开发中遇到的小知识点汇总(持续更新)
- 在iOS开发中遇到的一些情况
- ios移动开发遇到的一些小问题的解决办法
- iOS开发零碎知识点---(有一些还是比较实用的)。