charlinfeng / cfcitypickervc Goto Github PK
View Code? Open in Web Editor NEW城市选取控制器
License: MIT License
城市选取控制器
License: MIT License
为什么我用Xcode6.4编译十几出错误,是swift语法问题吗?感谢大师回复
学习学习
当历史选择为4个的时候 ,下面多了一行空白的,热门城市高度不够了
2016-05-04 15:24:31.521 CFCityPickerVC[17697:4651979] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x1545ad770 h=-&- v=-&- CFCityPickerVC.HeaderItemView:0x1545985a0.height == UIView:0x1545903e0.height - 344>",
"<NSLayoutConstraint:0x1546434a0 V:|-(8)-[UILabel:0x1547078e0'\U5f53\U524d\U57ce\U5e02'] (Names: '|':CFCityPickerVC.HeaderItemView:0x1545985a0 )>",
"<NSLayoutConstraint:0x154642cb0 V:[UILabel:0x1547078e0'\U5f53\U524d\U57ce\U5e02']-(15)-[CFCityPickerVC.CFCPContentView:0x154598c20]>",
"<NSLayoutConstraint:0x154637570 V:[CFCityPickerVC.CFCPContentView:0x154598c20]-(15)-| (Names: '|':CFCityPickerVC.HeaderItemView:0x1545985a0 )>",
"<NSLayoutConstraint:0x154629ee0 V:|-(10)-[CFCityPickerVC.CitySearchBar:0x1545906c0] (Names: '|':UIView:0x1545903e0 )>",
"<NSLayoutConstraint:0x154631d70 V:[CFCityPickerVC.CitySearchBar:0x1545906c0(36)]>",
"<NSLayoutConstraint:0x154631dc0 V:[CFCityPickerVC.CitySearchBar:0x1545906c0]-(0)-| (Names: '|':UIView:0x1545903e0 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x154642cb0 V:[UILabel:0x1547078e0'当前城市']-(15)-[CFCityPickerVC.CFCPContentView:0x154598c20]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-05-04 15:24:31.523 CFCityPickerVC[17697:4651979] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x1545ad770 h=-&- v=-&- CFCityPickerVC.HeaderItemView:0x1545985a0.height == UIView:0x1545903e0.height - 344>",
"<NSLayoutConstraint:0x154629ee0 V:|-(10)-[CFCityPickerVC.CitySearchBar:0x1545906c0] (Names: '|':UIView:0x1545903e0 )>",
"<NSLayoutConstraint:0x154631d70 V:[CFCityPickerVC.CitySearchBar:0x1545906c0(36)]>",
"<NSLayoutConstraint:0x154631dc0 V:[CFCityPickerVC.CitySearchBar:0x1545906c0]-(0)-| (Names: '|':UIView:0x1545903e0 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x154631dc0 V:[CFCityPickerVC.CitySearchBar:0x1545906c0]-(0)-| (Names: '|':UIView:0x1545903e0 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-05-04 15:24:31.530 CFCityPickerVC[17697:4651979] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x1545ade40 h=-&- v=-&- CFCityPickerVC.HeaderItemView:0x1545985a0.width == UIView:0x1545903e0.width>",
"<NSLayoutConstraint:0x1546434f0 UILabel:0x1547078e0'\U5f53\U524d\U57ce\U5e02'.leading == CFCityPickerVC.CFCPContentView:0x154598c20.leading>",
"<NSLayoutConstraint:0x154642d40 H:|-(18)-[UILabel:0x1547078e0'\U5f53\U524d\U57ce\U5e02'] (Names: '|':CFCityPickerVC.HeaderItemView:0x1545985a0 )>",
"<NSLayoutConstraint:0x154642c60 H:[CFCityPickerVC.CFCPContentView:0x154598c20]-(30)-| (Names: '|':CFCityPickerVC.HeaderItemView:0x1545985a0 )>",
"<NSLayoutConstraint:0x1545b3890 'UIView-Encapsulated-Layout-Width' H:[UIView:0x1545903e0(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x1546434f0 UILabel:0x1547078e0'当前城市'.leading == CFCityPickerVC.CFCPContentView:0x154598c20.leading>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-05-04 15:24:31.534 CFCityPickerVC[17697:4651979] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x15471fa60 h=-&- v=-&- CFCityPickerVC.HeaderItemView:0x154704520.width == UIView:0x1545903e0.width>",
"<NSLayoutConstraint:0x15470a330 UILabel:0x1547080e0'\U70ed\U95e8\U57ce\U5e02'.leading == CFCityPickerVC.CFCPContentView:0x1547082f0.leading>",
"<NSLayoutConstraint:0x15470a380 H:|-(18)-[UILabel:0x1547080e0'\U70ed\U95e8\U57ce\U5e02'] (Names: '|':CFCityPickerVC.HeaderItemView:0x154704520 )>",
"<NSLayoutConstraint:0x15470a420 H:[CFCityPickerVC.CFCPContentView:0x1547082f0]-(30)-| (Names: '|':CFCityPickerVC.HeaderItemView:0x154704520 )>",
"<NSLayoutConstraint:0x1545b3890 'UIView-Encapsulated-Layout-Width' H:[UIView:0x1545903e0(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x15470a330 UILabel:0x1547080e0'热门城市'.leading == CFCityPickerVC.CFCPContentView:0x1547082f0.leading>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-05-04 15:24:31.538 CFCityPickerVC[17697:4651979] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x1545b1900 h=-&- v=-&- CFCityPickerVC.HeaderItemView:0x1547085d0.width == UIView:0x1545903e0.width>",
"<NSLayoutConstraint:0x154709850 UILabel:0x154708770'\U5386\U53f2\U9009\U62e9'.leading == CFCityPickerVC.CFCPContentView:0x154708d60.leading>",
"<NSLayoutConstraint:0x1547098a0 H:|-(18)-[UILabel:0x154708770'\U5386\U53f2\U9009\U62e9'] (Names: '|':CFCityPickerVC.HeaderItemView:0x1547085d0 )>",
"<NSLayoutConstraint:0x154709940 H:[CFCityPickerVC.CFCPContentView:0x154708d60]-(30)-| (Names: '|':CFCityPickerVC.HeaderItemView:0x1547085d0 )>",
"<NSLayoutConstraint:0x1545b3890 'UIView-Encapsulated-Layout-Width' H:[UIView:0x1545903e0(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x154709850 UILabel:0x154708770'历史选择'.leading == CFCityPickerVC.CFCPContentView:0x154708d60.leading>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-05-04 15:24:31.540 CFCityPickerVC[17697:4651979] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x15462a040 H:|-(18)-[CFCityPickerVC.CitySearchBar:0x1545906c0] (Names: '|':UIView:0x1545903e0 )>",
"<NSLayoutConstraint:0x154629ac0 H:[CFCityPickerVC.CitySearchBar:0x1545906c0]-(20)-| (Names: '|':UIView:0x1545903e0 )>",
"<NSLayoutConstraint:0x1545b3890 'UIView-Encapsulated-Layout-Width' H:[UIView:0x1545903e0(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x154629ac0 H:[CFCityPickerVC.CitySearchBar:0x1545906c0]-(20)-| (Names: '|':UIView:0x1545903e0 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-05-04 15:24:31.545 CFCityPickerVC[17697:4651979] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x15471fa60 h=-&- v=-&- CFCityPickerVC.HeaderItemView:0x154704520.width == UIView:0x1545903e0.width>",
"<NSLayoutConstraint:0x15470a380 H:|-(18)-[UILabel:0x1547080e0'\U70ed\U95e8\U57ce\U5e02'] (Names: '|':CFCityPickerVC.HeaderItemView:0x154704520 )>",
"<NSLayoutConstraint:0x15470a510 H:[UIView:0x154703d40]-(0)-| (Names: '|':CFCityPickerVC.HeaderItemView:0x154704520 )>",
"<NSLayoutConstraint:0x15470a560 H:[UILabel:0x1547080e0'\U70ed\U95e8\U57ce\U5e02']-(6)-[UIView:0x154703d40]>",
"<NSLayoutConstraint:0x1545b3890 'UIView-Encapsulated-Layout-Width' H:[UIView:0x1545903e0(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x15470a560 H:[UILabel:0x1547080e0'热门城市']-(6)-[UIView:0x154703d40]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-05-04 15:24:31.546 CFCityPickerVC[17697:4651979] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x1545b1900 h=-&- v=-&- CFCityPickerVC.HeaderItemView:0x1547085d0.width == UIView:0x1545903e0.width>",
"<NSLayoutConstraint:0x1547098a0 H:|-(18)-[UILabel:0x154708770'\U5386\U53f2\U9009\U62e9'] (Names: '|':CFCityPickerVC.HeaderItemView:0x1547085d0 )>",
"<NSLayoutConstraint:0x154709a30 H:[UIView:0x154708ab0]-(0)-| (Names: '|':CFCityPickerVC.HeaderItemView:0x1547085d0 )>",
"<NSLayoutConstraint:0x154709a80 H:[UILabel:0x154708770'\U5386\U53f2\U9009\U62e9']-(6)-[UIView:0x154708ab0]>",
"<NSLayoutConstraint:0x1545b3890 'UIView-Encapsulated-Layout-Width' H:[UIView:0x1545903e0(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x154709a80 H:[UILabel:0x154708770'历史选择']-(6)-[UIView:0x154708ab0]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-05-04 15:24:31.548 CFCityPickerVC[17697:4651979] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x1545ade40 h=-&- v=-&- CFCityPickerVC.HeaderItemView:0x1545985a0.width == UIView:0x1545903e0.width>",
"<NSLayoutConstraint:0x154642d40 H:|-(18)-[UILabel:0x1547078e0'\U5f53\U524d\U57ce\U5e02'] (Names: '|':CFCityPickerVC.HeaderItemView:0x1545985a0 )>",
"<NSLayoutConstraint:0x1546375c0 H:[UIView:0x154598980]-(0)-| (Names: '|':CFCityPickerVC.HeaderItemView:0x1545985a0 )>",
"<NSLayoutConstraint:0x154704e80 H:[UILabel:0x1547078e0'\U5f53\U524d\U57ce\U5e02']-(6)-[UIView:0x154598980]>",
"<NSLayoutConstraint:0x1545b3890 'UIView-Encapsulated-Layout-Width' H:[UIView:0x1545903e0(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x154704e80 H:[UILabel:0x1547078e0'当前城市']-(6)-[UIView:0x154598980]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
let cityVC = CFCityPickerVC()
// //设置当前城市
cityVC.currentCity = "成都"
作者能在百忙之中改一个OC版出来就太感谢了。
verboseMessage = verboseMessageDictionary[status]!
貌似是因为verboseMessage取值为空
请教如何修复?
RT,感觉pod更方便一些。
oc调用swift就可以,谢谢。项目都是oc的只能调用,发现除你这个,没有多少可选择的。
目前XCode7.3 上运行会crash
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.