{"action":"created","issue":{"url":"https://api.github.com/repos/SnapKit/Masonry/issues/188","labels_url":"https://api.github.com/repos/SnapKit/Masonry/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/SnapKit/Masonry/issues/188/comments","events_url":"https://api.github.com/repos/SnapKit/Masonry/issues/188/events","html_url":"https://github.com/SnapKit/Masonry/issues/188","id":68106390,"number":188,"title":"[UIView mas_makeConstraints:]: unrecognized selector sent to instance","user":{"login":"mytcer","id":3055533,"avatar_url":"https://avatars.githubusercontent.com/u/3055533?v=3","gravatar_id":"","url":"https://api.github.com/users/mytcer","html_url":"https://github.com/mytcer","followers_url":"https://api.github.com/users/mytcer/followers","following_url":"https://api.github.com/users/mytcer/following{/other_user}","gists_url":"https://api.github.com/users/mytcer/gists{/gist_id}","starred_url":"https://api.github.com/users/mytcer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mytcer/subscriptions","organizations_url":"https://api.github.com/users/mytcer/orgs","repos_url":"https://api.github.com/users/mytcer/repos","events_url":"https://api.github.com/users/mytcer/events{/privacy}","received_events_url":"https://api.github.com/users/mytcer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-13T14:06:41Z","updated_at":"2015-05-15T08:43:21Z","closed_at":"2015-04-14T03:00:16Z","body":"I run the following code on iphone6，the program is crash，the error log is：`[UIView mas_makeConstraints:]: unrecognized selector sent to instance`\r\n\r\n```\r\n- (void)viewDidLoad {\r\n    [super viewDidLoad];\r\n\r\n    __weak ViewController *weakSelf = self;\r\n    \r\n    UIView *sv = [UIView new];\r\n    sv.backgroundColor = [UIColor blackColor];\r\n    [self.view addSubview:sv];\r\n    \r\n    [sv mas_makeConstraints:^(MASConstraintMaker *make) {\r\n        make.center.equalTo(weakSelf.view);\r\n        make.size.mas_equalTo(CGSizeMake(300, 300));\r\n    }];\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/SnapKit/Masonry/issues/comments/102320483","html_url":"https://github.com/SnapKit/Masonry/issues/188#issuecomment-102320483","issue_url":"https://api.github.com/repos/SnapKit/Masonry/issues/188","id":102320483,"user":{"login":"xingheng","id":2891714,"avatar_url":"https://avatars.githubusercontent.com/u/2891714?v=3","gravatar_id":"","url":"https://api.github.com/users/xingheng","html_url":"https://github.com/xingheng","followers_url":"https://api.github.com/users/xingheng/followers","following_url":"https://api.github.com/users/xingheng/following{/other_user}","gists_url":"https://api.github.com/users/xingheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xingheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xingheng/subscriptions","organizations_url":"https://api.github.com/users/xingheng/orgs","repos_url":"https://api.github.com/users/xingheng/repos","events_url":"https://api.github.com/users/xingheng/events{/privacy}","received_events_url":"https://api.github.com/users/xingheng/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T08:43:21Z","updated_at":"2015-05-15T08:43:21Z","body":"Make sure you have linked the Masonry static library successfully if you didn't use cocoapods, besides, Masonry mainly expands some objective-c categories for UIKit/AppKit, so you had better check the following links out. Briefly, you should add flag -ObjC and -all_load to your project's \"Other linker flags\".\r\n\r\n[Objective-C categories in static library](http://stackoverflow.com/questions/2567498/objective-c-categories-in-static-library)\r\n[linking objective-c categories in a static library](http://stackoverflow.com/questions/6820778/linking-objective-c-categories-in-a-static-library)\r\n\r\nGood luck!"}}