动画效果
1.
[UIView transitionWithView:<#(UIView *)#> duration:<#(NSTimeInterval)#> options:<#(UIViewAnimationOptions)#>
2.
animations:<#^(void)animations#> completion:^(BOOL finished) {
// <#code#>
// }]
3.
[UIView animateWithDuration:<#(NSTimeInterval)#> animations:<#^(void)animations#> completion:<#^(BOOL finished)completion#>]
[UIView animateWithDuration:<#(NSTimeInterval)#> delay:<#(NSTimeInterval)#> usingSpringWithDamping:<#(CGFloat)#> initialSpringVelocity:<#(CGFloat)#> options:<#(UIViewAnimationOptions)#> animations:<#^(void)animations#> completion:<#^(BOOL finished)completion#>]
NSTimer的重复执行
1.
[NSTimer scheduledTimerWithTimeInterval:<#(NSTimeInterval)#> invocation:<#(NSInvocation *)#> repeats:<#(BOOL)#>]
2.
跳转到其他UIViewController
[self performSegueWithIdentifier:@"toLogin" sender:nil];
//navigationController的push
[self.navigationController pushViewController:detailVC animated:YES];
3.
//模态推送
detailVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;//跳转的方式
[self presentViewController:detailVC animated:YES completion:nil];//页面的跳转
得到NSIndexPath方法
1.
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
2.
SpotTableViewCell *cell = (SpotTableViewCell *)sender;
NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
通过Identifier跳转
1.
[self performSegueWithIdentifier:@"toLogin" sender:nil];
2.
#pragma mark - Navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
//在通过哪一个链接跳转前进行的操作 图片名称的 传值
DetailRecommendVC * destination = [segue destinationViewController];//得到要跳转的目的地的ViewController
}
显示网页
- (void)initializeAppearance{
[super initializeAppearance];
//显示网页 UIWebView NSURL NSURLRequest
UIWebView*webView = [[UIWebView alloc] initWithFrame:self.view.bounds];
NSURL *url =[NSURL URLWithString:@"http://www.baidu.com"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];
[self.view addSubview:webView];
}