代码如下import AVFoundationclass ViewController: UIViewController { var audioPlayer:AVAudioPlayer? override func viewDidLoad() { super.viewDi...
分类:
编程语言 时间:
2014-11-15 15:25:00
阅读次数:
151
/** *获取视图当前的控制器**/- (UIViewController*)viewController { for (UIView* next = [self superview]; next; next = next.superview) { UIResponder* ne...
分类:
其他好文 时间:
2014-11-14 10:46:10
阅读次数:
149
在info.plist 添加两个键View controller-based status bar appearance YESStatus bar is initially hidden NO代码中在要隐藏状态栏的地方(UIViewController 中)@property (nonatomi....
分类:
其他好文 时间:
2014-11-13 22:16:27
阅读次数:
120
ViewController.h @interface?ViewController?:?UIViewController
@property?(readonly,?getter=isCancelled)?BOOL?cancelled;
@end GViewController.h @interface?GViewController?:?ViewController
...
分类:
其他好文 时间:
2014-11-13 19:16:14
阅读次数:
137
问:
Can you help me to understand, how to use UIActivityIndicatorView+AFNetworking or
UIProgressView+AFNetworking. Do I need to create one more UIViewController and if yes, where do I need to impleme...
分类:
Web程序 时间:
2014-11-12 23:01:38
阅读次数:
266
如何给UIViewController瘦身 随着程序逻辑复杂度的提高,你是否也发现了App中一些ViewController的代码行数急剧增多,达到了2,3千行,甚至更多。这时如果想再添加一点功能或者修改现有逻辑变得让人无比头疼。如果你遇到了这类问题,那是时候停下来了,思考一下如何更好地组织代码,....
分类:
移动开发 时间:
2014-11-12 22:56:40
阅读次数:
405
iOS开发UI篇—以微博界面为例使用纯代码自定义cell程序编码全过程(一)一、storyboard的处理直接让控制器继承uitableview controller,然后在storyboard中把继承自uiviewcontroller的控制器干掉,重新拖一个tableview controller...
分类:
移动开发 时间:
2014-11-12 20:59:28
阅读次数:
367
现在正在写的一个项目,涉及到了使用两个TabBar,然后我需要显示其中一个的时候,然后隐藏另外一个,但是中间却出现问题了.我查了一些资料,想总结一下关于TabBar的隐藏.
第一种方法是:
//隐藏tarBar
self.hidesBottomBarWhenPushed =
YES;
这个方法是UIViewController的属性,很好用...
分类:
其他好文 时间:
2014-11-12 13:54:39
阅读次数:
247
#import @interface FirstViewController : UIViewController@property (weak, nonatomic) IBOutlet UITextField *contentTxtField;@end#import "SecondViewCont...
分类:
移动开发 时间:
2014-11-11 16:04:06
阅读次数:
157
1.自定义cell
2.多种cell 的混合使用
3.cell自适应高度
自定义cell就是创建一个UITableViewCell的子类。
把cell上的控件创建都封装在子类中,简化UIViewController中的代码
子视图控件添加到cell的contentView上
cell中的控件如何显示Model中的信息?
...
分类:
移动开发 时间:
2014-11-11 09:25:08
阅读次数:
225