के साथ काम नहीं करने के लिए चौड़ाई मैं कुछ कोड है:गतिशील रूप से बदलने के UILabel autolayout
CGRect currentFrame = textLabel.frame;
CGSize max = CGSizeMake(textLabel.frame.size.width, 3000);
CGSize expected = [[textLabel text] sizeWithFont:textLabel.font constrainedToSize:max lineBreakMode:textLabel.lineBreakMode];
currentFrame.size.height = expected.height;
textLabel.frame = currentFrame;
expected.height = expected.height + 70;
[scrollView setContentSize:expected];
पाठलेबल UIScrollView के अंदर रखा बहु पाठ जानकारी प्रदर्शित करने के।
आवेदन के पुराने संस्करण में, 4-इंच स्क्रीन समर्थन के बिना, सब कुछ सही था। लेकिन दुर्भाग्य से, UILabel का आकार बदलना काम नहीं करता है।
शायद, कोई मेरी सलाह दे सकता है, मुझे क्या बदलना चाहिए?
धन्यवाद।
आप इसके बजाय 'UITextField' नियंत्रण का उपयोग क्यों नहीं करते? – holex