//方法一在跳转的事件里面写 UIViewController *viewController = [[UIViewControlleralloc] init]; viewController.hidesBottomBarWhenPushed = YES; [self.navigationCont....
分类:
其他好文 时间:
2015-01-09 17:12:49
阅读次数:
186
上一话中实现了两个控制器间的传值,最终效果如图:
这是我们的主页面:
在ViewController中我们主页显示的内容是放到不同的数组中的:
var restaurantNames = ["cg1","cg2","cg3","cg4","cg5","cg6","cg7","cg8","cg9","cg10","cg11"]
var restaurantImages ...
分类:
移动开发 时间:
2015-01-09 14:24:08
阅读次数:
333
//通过xib文件创建一个视图控制器。并作为窗口的根控制器self.viewController = [[ViewController alloc] initWithNibName:@"ViewController"bundle:nil];//通过代码创建一个视图控制器,self.viewContr...
分类:
移动开发 时间:
2015-01-08 20:02:52
阅读次数:
213
ViewController页面传到TwoViewController页面name的值:两个页面都拥有一个字符串对象,跳转之前,把对象传过去。#import @interface ViewController : UIViewController@property (nonatomic,copy)N...
分类:
其他好文 时间:
2015-01-08 19:50:43
阅读次数:
182
#import @interface ViewController : UIViewController{ UIWebView *webView; UISearchBar *searchBar;} @end -(void)loadView{ [super ...
分类:
Web程序 时间:
2015-01-08 15:09:05
阅读次数:
198
#import "ViewController.h"#import @interface ViewController (){ //时针 UIImageView *m_s; //分针 UIImageView *m_f; //秒针 UIImageView *m_m;...
分类:
其他好文 时间:
2015-01-08 11:00:59
阅读次数:
277
如今iOS8下,使用Storyboards开发十分方便,搭配上Size Class后,并且适配更加便捷。但是突然由代码写界面或者xib转向故事板,难免有一些疑惑。由于故事板下,基本使用连续来跳转页面,但有些情况下总会用到代码控制页面跳转,这个时候传统的初始化ViewController后push过去...
分类:
移动开发 时间:
2015-01-07 23:20:51
阅读次数:
382
需求:1.三个隐藏的按钮,在红色按钮底部2.点击红色按钮时,底部三个隐藏按钮,就显示出来显示时候有旋转+平移的动画3.再次点击红色按钮,显示的三个按钮又隐藏隐藏时候旋转+平移动画文件和布局:实现的代码: 1 // 2 // ViewController.m 3 // MenuRotation 4.....
分类:
其他好文 时间:
2015-01-07 16:36:56
阅读次数:
227
示例布局和资源:示例代码: 1 // 2 // ViewController.m 3 // CarsAnimation 4 // 5 // Created by xiaomoge on 15/1/6. 6 // Copyright (c) 2015年 xiaomoge. All rights...
分类:
其他好文 时间:
2015-01-07 14:42:50
阅读次数:
209
iOS上使用地图比Android要方便,只需要新建一个MKMapView,addSubView即可。这次要实现的效果如下:有标注(大头针),定位,地图。1、添加地图1.1 新一个Single View app ,选择默认项,创建后,在ViewController.h[cpp] view plainc...
分类:
移动开发 时间:
2015-01-07 12:33:11
阅读次数:
259