シングルトンとかで使う感じかな。
+ (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
Go to list of users who liked