01 2013 档案

摘要:单例模式的意思就是只有一个实例。单例模式确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。这个类称为单例类。1.单例模式的要点: 显然单例模式的要点有三个;一是某个类只能有一个实例;二是它必须自行创建这个实例;三是它必须自行向整个系统提供这个实例。2.单例模式的优点: 1.实例控制:Singleton 会阻止其他对象实例化其自己的 Singleton 对象的副本,从而确保所有对象都访问唯一实例。 2.灵活性:因为类控制了实例化过程,所以类可以更加灵活修改实例化过程IOS中的单例模式 在objective-c中要实现一个单例类,至少需要做以下四个步骤: 1、为单例对象实... 阅读全文
posted @ 2013-01-11 16:32 leevaboo 阅读(149) 评论(0) 推荐(0)
摘要:iOS6.0中抛弃了- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation的方法对横竖屏切换的支持,ios6.0中的对横竖切换的支持步骤为第一info.plist中Supported interface orientations中加入支持的方向第二 在AppDelegate中加入 -(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindo... 阅读全文
posted @ 2013-01-09 15:24 leevaboo 阅读(224) 评论(0) 推荐(0)
摘要:#import <UIKit/UIKit.h>@interface YS_PageControl : UIPageControl@end//////////////////////////////////#import "YS_PageControl.h"@implementation YS_PageControl//@synthesize activeImage;//@synthesize inactiveImage;- (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; 阅读全文
posted @ 2013-01-07 15:12 leevaboo 阅读(211) 评论(0) 推荐(0)
摘要:- (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { // Initialization code _backImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height - 20)]; _backImage.userInteractionEnabled = YES; _backImage... 阅读全文
posted @ 2013-01-07 11:11 leevaboo 阅读(566) 评论(0) 推荐(0)
摘要:本来已经写了很多,就因为切换页面就没有了,以后切之前得注意了 mac电脑的伤不起UI里面有很多控件比如UIView UIControl UILabel UIButton UIScrollView UIWindow UIWebView UITabBarUITableViewUITableViewCellUIToolbarUITextFieldUITextView UIImageViewUIPageControlUIPickerViewUIProgressViewUIAlertViewUISearchBarUISegmentedControlUISearchBarUISliderUISwitchU 阅读全文
posted @ 2013-01-02 01:08 leevaboo 阅读(310) 评论(0) 推荐(0)
摘要:不得不给自己一个教训,切换之前发表一下,后面可以在编辑这样不至于写的东西就全没有了 阅读全文
posted @ 2013-01-01 23:42 leevaboo 阅读(130) 评论(0) 推荐(0)