NSButton with Image and Alternate image disappears on macOS 10.13 - xcode-storyboard

I have a mac application with the views built in a storyboard, targeted at 10.13.
In all OS's above 10.13 all appears fine, however in 10.13 all of the buttons disappear. Buttons are Style Square, type Switch, bordered is on, transparent is on and I have both an Image and Alternate image selected.
Not sure what could be causing this and I don't have a machine running 10.13 to test on. Any ideas?
Thanks

Solution A: Switch off Bordered and Transparent, like the default check box in IB. A transparent button never draws itself (according to the documentation).
Solution B: Switch on the layer of the button or one of its superviews in the View Effects Inspector. From 10.14 the button has a layer by default.
Both solutions have the side effect that the title is also drawn, even if the image position is Image only. Remove the title as a workaround.

Related

xCode - Why can't I see this object on the view?

This might be a silly question, but why in the world can't I see the the following button that I simply dragged and dropped to the view from the interface builder?
I am using Simulator iPhone Retina (3.5 inch) / iOS 7. When I try to scroll to the bottom, the scrolling ends and I cannot see the button that I placed at the bottom. Why is that? Thanks.
EDIT: I didn't do anything fancy. I simply created a new single view app, and then dragged the button to the bottom of the view on storyboard and then clicked run.
Storyboard simulate size of 4 inch display. When you run it on 3.5 inch display, content at the bottom of the screen will be clipped.
Just add constraints to attach button to bottom of the screen.

How do I fix empty 44px space in iOS7 view with ViewDeckController?

I am in the process of transitioning an app to iOS7. All of the views throughout the app have a 44px empty space at the bottom that appears to be for a bottom toolbar or something, but I am not trying to display a bottom toolbar. This space also exists on views that do have a bottom toolbar and the toolbar just shows directly above it.
The red space shown is actually a view behind the black view. No matter what size I set the frame of the black view to, the red space is always shown. I am also hiding the status bar in plist, so don't know if this is an artifact from that or if it has something to do with navigation bar as they are both normally 44px in height.
I have looked at the transitioning guide and haven't found anything that's worked. Any ideas to what could be causing this and how to fix?
UPDATE:
I have tried setting edgesForExtendedLayout = UIRectEdgeAll and extendedLayoutIncludesOpaqueBars = YES (also tried NO) with no effect. When I look at the subviews of the navigation controller it shows a UIToolBar as hidden, but shows it contains a frame in the exact area the view refuses to resize to even with autolayout constraints.
UPDATE 2:
This is actually a problem with ViewDeckController (https://github.com/Inferis/ViewDeck) and the way it sets it's center view bounds.
I believe it has to do with the UINavigationBar. Try toggling the following options in Storyboard and see if it solves the problem. Namely, the 'Extend Edges' options:
These options can also be set in code with the edgesForExtendedLayout and extendedLayoutIncludesOpaqueBars properties on UIViewController.
If you are transitioning to iOS 7, you should be using an Auto Layout constraint to anchor to the Bottom Layout guide. Control drag from your view to the Bottom Layout guide and choose Vertical Space from the popup menu.
Using frames in iOS 7 is harder and is the way of the past.
Auto Layout is hard to grasp at first, but it is very powerful once you get the feel.
This is actually a problem with third party library ViewDeckController (https://github.com/Inferis/ViewDeck) and the way it sets centerViewBounds for IIViewDeckControllerIntegrated. I was able to figure it out after changing to IIViewDeckControllerContained and seeing the view sized correctly.
In IIViewDeckController.m, just return self.referenceBounds for iOS7 like it does for IIViewDeckControllerContained.

iPhone 5 retina 4 inch touch screen

I'm adapting my app to iphone 5 and I've got a problem. I saw all documentation regarding this and it didn't work yet.
I put the Default-568h#2x.png and everything resized successfully.
The problem is in the touch stuff. I've got a toolbar on the bottom and when I touch it nothing happens :( in the retina 4" simulator. Works fine in retina 3.5
In retina 4", if I set the toolbar in the inspector above 439 px in the Y position works fine. Anything below this makes my toolbar not to work.
As I said, I tried many many things unsuccessfully.
I'm using Xcode 4.6.1, I've got a Main View (not having a Window option in the Attributes inspector).
Thanks in advance.
Your window or the main view is not resizing correctly. Make sure you have set them up such that they autoresize in both directions. Try to set different background colors to your views to find the view that is not resizing correctly.
Ensure that all of your views are auto-resizing correctly to fill the screen. It sounds like the main container view you have isn't being resized and is drawing the toolbar outside of its frame. This will work from a visual point of view as UIView - clipsToBounds defaults to NO, but touches won't work outside the frame.

Scroll View with transparent background (Objective-c Mac OS X)

I have a Scroll View in my Mac app with a white background but I want the background to be completely transparent. I changed the opacity of the background to 0 but that doesn't seem to help, so I added an image of my settings and i was hoping you maybe were able to see the problem
Thank you in advance!
is this for a 10.7 App? If so it should just work out of the box. If you are doing 10.6 or earlier you might have to implement your own custom scrollbar or use a toolkit like Chamelion,etc to get the effect you are looking for. Only 10.7 has overlay scrollbars by default, prior to this the OS scrollbars subtracted area from the content view to dedicate to scrollbars.
On iOS, you just set the background to the clearColor. It seems logical the same would apply to the Mac.

Seems like it should be easy: Landscape Scrolling Text Field

I have a application that I am working on that is in landscape mode and does not rotate. However I can not get the text field to rotate. I have been putting in way to many hours so don't be to harsh if this is a easy answer...
Are you using Interface Builder to create the view? In that case, adding the UITextField to the UIView in landscape mode. In case you do not know how to use IB for creating views in landscape mode, open the UIView object in IB. There is a small arrow on the top-right corner of the view. Click on that arrow to rotate the view to landscape mode.
Edit your Info.plist file so that it includes the "Initial device orientation" key and specify UIDeviceOrientationLandscapeLeft (the Home button should be to the right if an app opens in landscape, according to Apple's UI guidelines). Some samples come with this property already in the plist, but most don't.