1.获取屏幕大小:
CGSize dispViewSize = [[UIScreen mainScreen] bounds].size;
2。一个小的子View显示,disable 背景的大View
在背景的大View上添加一个半透明的button,在显示子View
3.添加Navigate:
UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(gotoPresentationView:)];
self.navigationItem.leftBarButtonItem = leftButton;
UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(openCloudView:)];
self.navigationItem.rightBarButtonItem = rightButton;
4.定义view的推出方向为从右到左:
-(void)navigationLeftToRightAnimation
{
CATransition *transition = [CATransition animation];
transition.duration = 0.5;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionMoveIn;
transition.subtype = kCATransitionFromBottom;
transition.delegate = self;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
self.navigationController.navigationBarHidden = NO;
[self.navigationController pushViewController:documentViewcontroller animated:YES];
}
5.在任意文件中获取当前 工程的delegate:
KWAppDelegate* pApp = (KWAppDelegate*)[UIApplication sharedApplication].delegate;
6.隐藏UITableView没有的cell的横线:
-(void)setExtraCellLineHidden
{
UIView *view = [[UIView alloc] init];
view.backgroundColor = [UIColor clearColor];
[self.mTableView setTableFooterView:view];
[view release];
}