Note that there are some explanatory texts on larger screens.

plurals
  1. POIssue with "autoresizingMask" with two UITextViews
    primarykey
    data
    text
    <p>I have a problem with "autoresizingMask" with two UITextView. When I resize the two UITextViews, overlaps the first above the second. I attached an image to explain the problem.</p> <p>Thanks!</p> <p><img src="https://i.stack.imgur.com/cDnSr.png" alt="enter image description here"></p> <p>Update: I put the revenant code</p> <p>[UIView]</p> <pre><code>self.autoresizesSubviews = YES; // Configure title label _titleLabel = [[UILabel alloc] init]; _titleLabel.frame = CGRectMake(4.0, 4.0, self.bounds.size.width - 8.0, 33.0); _titleLabel.backgroundColor = APP_COLOR(1.0); _titleLabel.font = FONT_LATO_BOLD(18.0); _titleLabel.textColor = [UIColor whiteColor]; _titleLabel.textAlignment = UITextAlignmentCenter; [self addSubview:_titleLabel]; // Question textView _questionTextView = [[UITextView alloc] initWithFrame:CGRectMake(0.0, 0.0, CGRectGetWidth(_titleLabel.bounds), (usableHeight / 2.0) - 4.0)]; _questionTextView.layer.cornerRadius = 8.0; _questionTextView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleBottomMargin; [self addSubview:_questionTextView]; // Answer textView _answerTextView = [[UITextView alloc] initWithFrame:CGRectMake(CGRectGetMinX(_questionTextView.frame), CGRectGetMaxY(_questionTextView.frame) + 8.0, CGRectGetWidth(_questionTextView.bounds), (usableHeight / 2.0) - 4.0)]; _answerTextView.layer.cornerRadius = 8.0; _answerTextView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin; [self addSubview:_answerTextView]; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload