{"action":"created","issue":{"url":"https://api.github.com/repos/sauchye/dev_notes/issues/12","labels_url":"https://api.github.com/repos/sauchye/dev_notes/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/sauchye/dev_notes/issues/12/comments","events_url":"https://api.github.com/repos/sauchye/dev_notes/issues/12/events","html_url":"https://github.com/sauchye/dev_notes/issues/12","id":110946392,"number":12,"title":"Third party open source libraries(第三方开源类库)","user":{"login":"sauchye","id":4171847,"avatar_url":"https://avatars.githubusercontent.com/u/4171847?v=3","gravatar_id":"","url":"https://api.github.com/users/sauchye","html_url":"https://github.com/sauchye","followers_url":"https://api.github.com/users/sauchye/followers","following_url":"https://api.github.com/users/sauchye/following{/other_user}","gists_url":"https://api.github.com/users/sauchye/gists{/gist_id}","starred_url":"https://api.github.com/users/sauchye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sauchye/subscriptions","organizations_url":"https://api.github.com/users/sauchye/orgs","repos_url":"https://api.github.com/users/sauchye/repos","events_url":"https://api.github.com/users/sauchye/events{/privacy}","received_events_url":"https://api.github.com/users/sauchye/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sauchye/dev_notes/labels/ReactiveCocoa","name":"ReactiveCocoa","color":"009809"},{"url":"https://api.github.com/repos/sauchye/dev_notes/labels/TTTAttributedLabel","name":"TTTAttributedLabel","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-12T10:12:52Z","updated_at":"2015-10-12T10:22:22Z","closed_at":null,"body":"## ReactiveCaocoa\r\n#### 常见登录，当信息填写完整后，按钮可以点击\r\n```\r\n   RAC(self.loginBtn, enabled) = [RACSignal combineLatest:@[self.usernameTextField.rac_textSignal,\r\n                                                             self.passwordTextField.rac_textSignal]\r\n                                                    reduce:^id(NSString *userName, NSString *password) {\r\n        \r\n        if (userName.length == 11 && password.length >= 6) {\r\n            self.loginBtn.backgroundColor = kNAVIGATION_BAR_COLOR;\r\n        }else{\r\n            \r\n            self.loginBtn.backgroundColor = kBUTTON_DEFAULT_BACKGROUND_COLOR;\r\n        }\r\n        \r\n        return @([RAManager isVaildMobileNumber:userName]  && userName.length == 11  && password.length >= 6 );\r\n    }];\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sauchye/dev_notes/issues/comments/147359072","html_url":"https://github.com/sauchye/dev_notes/issues/12#issuecomment-147359072","issue_url":"https://api.github.com/repos/sauchye/dev_notes/issues/12","id":147359072,"user":{"login":"sauchye","id":4171847,"avatar_url":"https://avatars.githubusercontent.com/u/4171847?v=3","gravatar_id":"","url":"https://api.github.com/users/sauchye","html_url":"https://github.com/sauchye","followers_url":"https://api.github.com/users/sauchye/followers","following_url":"https://api.github.com/users/sauchye/following{/other_user}","gists_url":"https://api.github.com/users/sauchye/gists{/gist_id}","starred_url":"https://api.github.com/users/sauchye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sauchye/subscriptions","organizations_url":"https://api.github.com/users/sauchye/orgs","repos_url":"https://api.github.com/users/sauchye/repos","events_url":"https://api.github.com/users/sauchye/events{/privacy}","received_events_url":"https://api.github.com/users/sauchye/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T10:22:22Z","updated_at":"2015-10-12T10:22:22Z","body":"##  TTTAttributedLabel\r\n#### 常见用户协议，如：点击注册,即表示同意《...服务条款》\r\n```\r\n    TTTAttributedLabel *lineLabel = [[TTTAttributedLabel alloc] initWithFrame:CGRectZero];\r\n    lineLabel.textAlignment = NSTextAlignmentCenter;\r\n    lineLabel.font = [UIFont systemFontOfSize:12];\r\n    lineLabel.textColor = [UIColor grayColor];\r\n    lineLabel.numberOfLines = 0;\r\n    lineLabel.delegate = self;\r\n    lineLabel.linkAttributes = kLinkAttributes;\r\n    lineLabel.activeLinkAttributes = kLinkAttributesActive;\r\n    NSString *tipStr = @\"点击注册,即表示同意《...服务条款》\";\r\n    lineLabel.text = tipStr;\r\n    [lineLabel addLinkToTransitInformation:@{@\"actionStr\" : @\"gotoServiceTermsVC\"} withRange:[tipStr rangeOfString:@\"《...服务条款》\"]];\r\n    CGRect registerBtnFrame = _registerBtn.frame;\r\n    lineLabel.frame = CGRectMake(CGRectGetMinX(registerBtnFrame),lookBtn.frame.size.height+lookBtn.frame.origin.y+60, CGRectGetWidth(registerBtnFrame), 12);\r\n    [self.scrollView addSubview:lineLabel];\r\n```\r\n\r\n```\r\n#pragma mark TTTAttributedLabelDelegate\r\n- (void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithTransitInformation:(NSDictionary *)components{\r\n    if ([[components objectForKey:@\"actionStr\"] isEqualToString:@\"gotoServiceTermsVC\"]) {\r\n\r\n    }\r\n}\r\n\r\n```"}}