nui icon indicating copy to clipboard operation
nui copied to clipboard

Popover on latest iOS fills whole screen, covering everything with background color

Open Oggerschummer opened this issue 12 years ago • 4 comments

Design as follows: Very basic UIView, containing text field and button, being called as popover. Modeled in Storyboard with latest XCode

Behavior: iOS 6.x: works perfect, popup show in size modeled, calling view is visible. With upcoming version of iOS the popover content area is the same (and actually shows the content). Nevertheless the screen is filled up with the background color I set for UIView in the nss file, covering and hiding the view the popup is being called from.

Only solution I came up with up to now to get a properly sized popover is by setting a global exclude for UIView class, [NUISettings setGlobalExclusions:@[@"UIView"]]; which is not a good solution.

Showing up on iPad Mini on lastest beta Cross check with iPad4 on iOS6.1 Works fine on app without NUI.

Oggerschummer avatar Sep 05 '13 08:09 Oggerschummer

Any update on this one? This is a definitely a blocker

acerbetti avatar Feb 17 '16 19:02 acerbetti

Due to issues like this (see issue #323), I would recommend generic classes not be used (i.e. View, Button, TextField, etc.). Instead specify a custom class in the .nss file (i.e. MyView, MyButton, MyTextField) and then assign views to use the respective style classes via assigning the object's nuiClass property. This approach allows for deliberate control over what to style which I believe is the best practice to adhere to.

Stunner avatar Feb 17 '16 20:02 Stunner

Makes sense. Thank you

acerbetti avatar Feb 17 '16 21:02 acerbetti

@timbodeit @tombenner perhaps we should consider adding a "Best Practices" section to the README (or better yet, the Wiki) discouraging this usage of styling? I don't really want to deprecate this functionality as it can come in handy for fast prototyping/demo purposes.

Stunner avatar Feb 18 '16 07:02 Stunner