tombenner / nui

Style iOS apps with a stylesheet, similar to CSS
MIT License
3.76k stars 461 forks source link

App "Back" button can't be excluded? #323

Open SteveNewhouse opened 8 years ago

SteveNewhouse commented 8 years ago

How can I make it so the Button style doesn't get applied to the system "Back" button you see when you open an app from another app for example (like if you click a deep link from Safari)? I tried using the UI debugger to find the class name, but the back button element doesn't appear in the debugger.

image

Stunner commented 8 years ago

Good question. I don't know, but this is the reason why I don't like using generic classes like "Button", "Label", etc. I prefer having finer control over what exactly is rendered and how.

fpaaske commented 8 years ago

Any progress on this issue? This is a recurring issue for me now that iOS 9 is more or less dominating the devices.

timbodeit commented 8 years ago

Both @stunner and only apply styling to custom nuiClasses. This would also be my suggestion on how to resolve these issues in your project. Please understand, that were working on nui in our free time and working on this issue ourselves provides no personal value to us. @frapaa: If you are willing to have a stab at it, a pull request would be highly welcome.

fpaaske commented 8 years ago

Using custom classes every where is probably a good workaround, but it kind of defeats one of the main motivators for using NUI.

I completely understand, and I didn't mean to sound demanding.

I doubt I'm able to contribute to the code, but it sure would be fun to try :)

Stunner commented 8 years ago

Please see my comments in issue https://github.com/tombenner/nui/issues/162. Due to these issues being inevitable as future changes to the iOS SDK will cause more of these problems to crop up. And thus, cause us to approach them in a reactive fashion (as opposed to proactively), it is poor practice to implement generic class styling in a production app. I would advise it be used for prototyping/proof-of-concept work only.

As @timbodeit mentioned, we would be more than happy to review a pull request regarding this issue.

I doubt I'm able to contribute to the code, but it sure would be fun to try :)

Yes please do try, if there are any issues we will alert you to them and you can take another stab at it. :) However, I strongly advise you change the way your app is styled to avoid other similar issues in the future.

fpaaske commented 8 years ago

Thanks, I'll see how much work it is to work add custom classes instead. It'd only be the buttons in the first round. That might not be too much to handle.