You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I embed a custom contentview in the smcallout.
Its gui is defined in a xib, and I have many constraints (autolayout).
When the constraints attach to the right side eg uilabel from left side 10p and right side 10p
then the label is stretched on de right side far beyond the right edge... All constraints
hooked to the right side get messed up. As a temp workarround I have replaced them by
constraints to the left + specify hardcode width constraint. But what is happening here?
The text was updated successfully, but these errors were encountered:
So the callout view doesn't do any kind of special "treatment" to contentView - it simply takes the frame.size on the contentView you assign and uses that, then adds it as a subview.
I'm not an expert on autolayout, but you might try adding your custom view as a subview of a "blank" UIView that you create in code with the frame of the size you want. Example:
UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(0,0,100,100)];
UIView *myViewFromXib = // however you construct this
[contentView addSubview:myViewFromXib];
calloutView.contentView = contentView;
I embed a custom contentview in the smcallout.
Its gui is defined in a xib, and I have many constraints (autolayout).
When the constraints attach to the right side eg uilabel from left side 10p and right side 10p
then the label is stretched on de right side far beyond the right edge... All constraints
hooked to the right side get messed up. As a temp workarround I have replaced them by
constraints to the left + specify hardcode width constraint. But what is happening here?
The text was updated successfully, but these errors were encountered: