{"action":"closed","issue":{"url":"https://api.github.com/repos/Draveness/DKNightVersion/issues/4","labels_url":"https://api.github.com/repos/Draveness/DKNightVersion/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Draveness/DKNightVersion/issues/4/comments","events_url":"https://api.github.com/repos/Draveness/DKNightVersion/issues/4/events","html_url":"https://github.com/Draveness/DKNightVersion/issues/4","id":84412539,"number":4,"title":"Can't not support XIB","user":{"login":"likid1412","id":3095718,"avatar_url":"https://avatars.githubusercontent.com/u/3095718?v=3","gravatar_id":"","url":"https://api.github.com/users/likid1412","html_url":"https://github.com/likid1412","followers_url":"https://api.github.com/users/likid1412/followers","following_url":"https://api.github.com/users/likid1412/following{/other_user}","gists_url":"https://api.github.com/users/likid1412/gists{/gist_id}","starred_url":"https://api.github.com/users/likid1412/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/likid1412/subscriptions","organizations_url":"https://api.github.com/users/likid1412/orgs","repos_url":"https://api.github.com/users/likid1412/repos","events_url":"https://api.github.com/users/likid1412/events{/privacy}","received_events_url":"https://api.github.com/users/likid1412/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Draveness/DKNightVersion/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-06-03T07:31:58Z","updated_at":"2015-11-25T06:11:35Z","closed_at":"2015-11-25T06:11:35Z","body":"In Demo\r\n1. create `TestTableViewCell` class, also create xib.\r\n2. dray label and button, layout like `TableViewCell`, set the text color (Red or else) using xib\r\n3. don't set textColor for `TestTableViewCell`, only set `nightTextColor`, like this\r\n\r\n```\r\n- (void)awakeFromNib {\r\n    [DKNightVersionManager addClassToSet:self.class];\r\n    \r\n    self.label.numberOfLines = 0;\r\n    self.label.text = @\"DKNightVersion is a light wei-ght framework adding night   version to your iOS app.\";\r\n//    self.label.textColor = [UIColor darkGrayColor];\r\n    self.label.lineBreakMode = NSLineBreakByCharWrapping;\r\n    self.nightBackgroundColor = UIColorFromRGB(0x343434);\r\n}\r\n```\r\n\r\n4. register this nib, and use it replace `TableViewCell`\r\n5. run\r\n6. switch night and day theme, then you will see label color can't change back to Red color.\r\n\r\nI think this code cause the problem:\r\n\r\n```\r\n- (void)hook_setTextColor:(UIColor*)textColor {\r\n    if ([DKNightVersionManager currentThemeVersion] == DKThemeVersionNormal) [self setNormalTextColor:textColor];\r\n    [self hook_setTextColor:textColor];\r\n}\r\n```\r\n\r\nMay be UILabel don't call `setTextColor:` method, instead directyly using `_textColor = [UIColor xxxColor]`"}}