シングルトンとかで使う感じかな。
+ (HKSQLite *) sharedSQLite
{
static HKSQLite *_SQLite;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_SQLite = [[HKSQLite alloc] initWithPath:self.path];
[_SQLite setup];
});
return _SQLite;
}
Go to list of users who liked
More than 5 years have passed since last update.
シングルトンとかで使う感じかな。
+ (HKSQLite *) sharedSQLite
{
static HKSQLite *_SQLite;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_SQLite = [[HKSQLite alloc] initWithPath:self.path];
[_SQLite setup];
});
return _SQLite;
}
Register as a new user and use Qiita more conveniently
Qiita Conference is the largest tech conference in Qiita!
Keynote Speaker
ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar
View event detailsGo to list of users who liked