Fix let retain

This commit is contained in:
kevinzhow
2015-10-07 23:55:39 +08:00
parent 20bc2ee5d1
commit cc0282653a
2 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
let directory: NSURL = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier(YepConfig.appGroupID)!
let realmPath = directory.URLByAppendingPathComponent("db.realm").path!
return Realm.Configuration(path: realmPath, schemaVersion: 1, migrationBlock: { migration, oldSchemaVersion in
return Realm.Configuration(path: realmPath, schemaVersion: 2, migrationBlock: { migration, oldSchemaVersion in
})
}
@@ -1164,11 +1164,17 @@ class ConversationViewController: BaseViewController {
feedView.feed = feed
feedView.foldAction = { [weak self] in
self?.conversationCollectionView.contentInset.top = 64 + FeedView.foldHeight + conversationCollectionViewContentInsetYOffset
if let strongSelf = self {
self?.conversationCollectionView.contentInset.top = 64 + FeedView.foldHeight + strongSelf.conversationCollectionViewContentInsetYOffset
}
}
feedView.unfoldAction = { [weak self] feedView in
self?.conversationCollectionView.contentInset.top = 64 + feedView.normalHeight + conversationCollectionViewContentInsetYOffset
if let strongSelf = self {
self?.conversationCollectionView.contentInset.top = 64 + feedView.normalHeight + strongSelf.conversationCollectionViewContentInsetYOffset
}
}
//feedView.backgroundColor = UIColor.orangeColor()