আমি আমার কাস্টম ইউআইটিএবলভিউ সেলগুলি বিন্যাস করতে প্রোগ্রামিয়ালি স্বয়ংক্রিয় বিন্যাসের সীমাবদ্ধতাগুলি ব্যবহার করছি এবং আমি সেল আকারগুলি সঠিকভাবে সংজ্ঞায়িত করছি tableView:heightForRowAtIndexPath:
এটি iOS6 এ ঠিকঠাকভাবে কাজ করছে এবং এটি দেখতেও দুর্দান্ত পাশাপাশি সহ iOS7 জরিমানা
কিন্তু আমি যখন iOS7 এ অ্যাপটি চালাচ্ছি, কনসোলে আমি যে ধরণের বার্তা দেখি তা এখানে:
Break on objc_exception_throw to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2013-10-02 09:56:44.847 Vente-Exclusive[76306:a0b] 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)
(
"<NSLayoutConstraint:0xac4c5f0 V:|-(15)-[UIImageView:0xac47f50] (Names: '|':UITableViewCellContentView:0xd93e850 )>",
"<NSLayoutConstraint:0xac43620 V:[UIImageView:0xac47f50(62)]>",
"<NSLayoutConstraint:0xac43650 V:[UIImageView:0xac47f50]-(>=0)-[UIView:0xac4d0f0]>",
"<NSLayoutConstraint:0xac43680 V:[UIView:0xac4d0f0(1)]>",
"<NSLayoutConstraint:0xac436b0 V:[UIView:0xac4d0f0]-(0)-| (Names: '|':UITableViewCellContentView:0xd93e850 )>",
"<NSAutoresizingMaskLayoutConstraint:0xac6b120 h=--& v=--& V:[UITableViewCellContentView:0xd93e850(44)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0xac43650 V:[UIImageView:0xac47f50]-(>=0)-[UIView:0xac4d0f0]>
এবং প্রকৃতপক্ষে সেই তালিকার একটি বাধা আছে যা আমি চাই না:
"<NSAutoresizingMaskLayoutConstraint:0xac6b120 h=--& v=--& V:[UITableViewCellContentView:0xd93e850(44)]>"
এবং আমি এর translatesAutoresizingMaskIntoConstraints
সম্পত্তি সেট করতে পারি নাcontentView
NO => এ এটি পুরো ঘরটি গোলমেলে করবে।
44 ডিফল্ট কক্ষের উচ্চতা তবে আমি টেবিল ভিউ প্রতিনিধিতে আমার কাস্টম হাইটগুলি সংজ্ঞায়িত করেছি তাই কেন সেল কন্টেন্টভিউতে এই সীমাবদ্ধতা রয়েছে? এর কারণ কী হতে পারে?
IOS6 এ এটি হচ্ছে না এবং iOS6 এবং iOS7 উভয়ই ঠিক দেখায় fine
আমার কোডটি বেশ বড় তাই আমি এটি এখানে পোস্ট করব না তবে যদি আপনার প্রয়োজন হয় তবে একটি পেস্টবিনের জন্য নির্দ্বিধায় জিজ্ঞাসা করুন।
সেল ইন্টেরালাইজেশনে আমি কীভাবে এটি করছি তা নির্দিষ্ট করতে:
- আমি আমার সমস্ত লেবেল, বোতাম ইত্যাদি তৈরি করি
- আমি তাদের
translatesAutoresizingMaskIntoConstraints
সম্পত্তি NO সেট - আমি সেগুলিকে
contentView
ঘরের সাবভিউ হিসাবে যুক্ত করব - আমি সীমাবদ্ধতা যুক্ত
contentView
আমি কেবল আইওএস 7-তে কেন এটি বুঝতে আগ্রহী।