单例模式就是一个类在系统中最多只有一个实例对象,并通过一个全局的入口对这个实例对象进行访问。对于共享的资源,实现多个对象去封装是不必要的,不光占用系统资源,还有可能造成冲突,所以一般使用单例模式。#import "DSSingletonObject.h"@implementation DSSing....
分类:
移动开发 时间:
2015-12-20 19:15:44
阅读次数:
136
常见设置如下#import "TRTabBarController.h"@interface TRTabBarController ()@end@implementation TRTabBarController //设置选中后的背景图 [self.tabBar setSelectionIndic....
分类:
其他好文 时间:
2015-12-20 17:19:31
阅读次数:
114
This is a bank IT projects implementation, the main scope is to integrate all corporate customer information in order to provide customers with better...
分类:
其他好文 时间:
2015-12-19 21:43:41
阅读次数:
910
OC常见的关键字介绍:@看到这个关键字,我们就应该想到,这是Object-C对C语言的扩展,例如@interface XXX。@interface声明类@implementation实现类@protocol声明协议@optional与@protocol配合使用,说明协议中的某个或者某几个方法可以不实...
分类:
其他好文 时间:
2015-12-18 10:38:23
阅读次数:
169
------- ios培训、 android培训、java培训、期待与您交流! ----------一.分类Gategroy1.创建一个分类@interface类名(分类名)@end@implementation类名(分类名)@end 2.特点:(1)扩展已有类的功能 (2)分类中可以访问原有类的成...
分类:
其他好文 时间:
2015-12-18 09:06:40
阅读次数:
176
@interface SZMOAuthViewCtrl ()@end@implementation SZMOAuthViewCtrl- (void)viewDidLoad { [super viewDidLoad]; //1.创建一个webview UIWebView *webVi...
分类:
其他好文 时间:
2015-12-17 00:37:53
阅读次数:
886
音乐播放器 1 #import "ViewController.h" 2 3 @interface ViewController () 4 5 @end 6 7 @implementation ViewController 8 9 - (void)viewDidLoad {...
分类:
移动开发 时间:
2015-12-16 23:07:38
阅读次数:
277
@interface WeatherViewController ()@end@implementation WeatherViewController- (void)viewDidLoad { [super viewDidLoad]; UIImageView* iv=[[UIImage...
分类:
Web程序 时间:
2015-12-16 17:22:05
阅读次数:
122
找了点资料看了下,于是自己动手做了一个练习一下,主要用到TServerSocket和TClientSocket这个控件。客户端:var Form1: TForm1; NewTime:string;implementation{$R *.dfm}procedure TForm1.Button1Cl.....
分类:
其他好文 时间:
2015-12-15 22:50:44
阅读次数:
238
@interface ViewController (){ UIImageView* iv; UIButton* btn; UILabel* lbl;}@end@implementation ViewController- (void)viewDidLoad { [super viewDid...
分类:
其他好文 时间:
2015-12-14 18:17:46
阅读次数:
123