I have an app that runs fine inside of Xcode 6.3 that is running on MacOS X 10.5. When I copied this same program code to another Mac machine that is running EL Capitan v. 10.11.5 and Xcode 7.3.1, prepareForSegue will display a modal transition versus its configured "Show (e.g. Push)"!
I deleted the UINavigationController, and then reinstituted it by "embedding" it via the tableViewController. I also reestablished the "Show (e.g. Push)" Storyboard Segue Kind between the initial view controller, and the UINavigationController. Unfortunately, the transition is alway a Modal segue (the tableviewController opens from the bottom of the screen).
Please help me with this issue! Any suggestions would be greatly appreciated! Thank you
Related
In SwiftUI tutorial (link) it says to:
Command-click the text view’s initializer to show the structured editing popover, and then choose Embed in VStack
However, it does not work for me.
What is the command for that?
What that deprecated already?
If it helps someone out there, you must have changed Xcode shortcut preferences to go to "Definition" on "Command Click".
So now for seeing the structured editing popover, use "Control Command Click".
Seems to be an Xcode quirk caused by having the canvas hidden. Bring the preview canvas back on screen and the Command + Click functionality returns to normal:
I've seen similar weirdness with two Xcode windows open… especially if one window is hiding the Preview.
Another quirk mentioned above: the Library picker is missing the Views and Modifiers tab sometimes. Again, open the Preview Canvas and the Library will snap back to normal. You might also have to bring focus to the canvas (i.e. click on something there).
Close and reopen Xcode should help. Like code completion sometimes is not working the popover also sometimes stuck.
I found that command + Left Click on Text (within the .swift file) took me to the definition of Text, however command + Right Click caused the menu containing "everything" to appear, from which I was then able to select "Show in UISwift inspector".
I couldn't get anything to popup in the Canvas.
Using Xcode 12.2 on macOS 11.0.1
According to Apple's release notes for the latest Xcode 11 beta release, the inspector and preview features don't currently work without MacOS Catalina 10.15 (the current stable/public release is MacOS 10.14.6 at the time of posting).
You'll either need to wait until the publicly released version of Mac OS 10.15 or gain access to a beta version of MacOS to use these.
Source (Apple | Xcode 11 Release notes):
Xcode 11 supports development with SwiftUI. (22843503)
Note: SwiftUI previews and inspectors are only available when running on macOS Catalina 10.15.
Restart the project for 1 or 2 times and CMD+B(Build) your project one the start.
I'm building a Mac OS X app.
I just tried to set a toolbar button to show/hide a toolbar on NSWindow's title bar. But it doesn't do anything for me.
Initially I tried to achieve that with the checkbox in the interface builder.
Toolbar button I expected here is below.
I tried the checkbox in the interface builder to get the button like below.
I thought it could be no longer available in the latest El Capitan, then tried it with Xcode 4.6 on Lion but I could not see the button, neither.
I found the following page to explain how to add a button to the title bar on this site.
How to use NSTitlebarAccessoryViewController?
And I could manage to do that by myself.
But I'm still wondering if there is a way to use the default button.
Any suggestions would be appreciated.
I am pretty sure Apple dropped the toolbar button with OS X Lion. I assume the checkbox is only there for older versions. (Snow Leopard and earlier)
Adding your own button using NSTitlebarAccessoryViewController is a good idea!
I am having a very strange problem.
I have a tableView, which when the cell is clicked it segues to the next VC, sending the data from that cell with it via prepareForSegue function. From the next VC I then segue from there to another VC (again passing the data needed via prepareForSegue). The final VC is a chat style VC, so it contains a scrollView and a textView, the three VCs look like so:
In the chatViewController I have set up a Parse backend so it queries the data and then places inside the scrollView like so:
The problem I am having is that the keyboard does not pop open. I know the code is CORRECT! As it pops open when I make the chatViewController the initial VC. it just doesn't work when it is segued to from multiple VC.
Does anybody have any ideas on this or ever had any problems with segueing into a scrollViewController. I've tried everything I can think off.
Thanks in advance.
If you're on ios simulator, the software keyboard may be turned off. For actual emulation you may try a ios phone instead of simulator.
If you wanna appear the soft-keypad in simulator try following
solution
iOS Simulator -> Hardware -> Keyboard
Uncheck "Connect Hardware Keyboard"
Mine was checked because I was using my mac keyboard, but if you make sure it is unchecked the iPhone keyboard will always come up.
solution is actually copied from here
I'm quite new to iOS Programming. I've done Objective-C for about a year, and now I want to start making apps for the iPhone. I think I'm missing out on something really simple, though. What I've done is this:
First I created a new Single View Application with TestApp as a product name. I enabled Use Storyboards, Use Automatic Reference Counting and Include Unit Tests. After creating the project, I dragged a UIButton onto the View in the storyboard file.
Note that I didn't write a single line of code. I launched my app in the iPhone Simulator and pressed the button, but it's not responding. I know I didn't assign an action to the press of the button, but the gradient of the button isn't changing, as I know it should. The User Interaction Enabled properties of both my view and my button were enabled.
Recently, I've created a few apps in Xcode that worked just fine, but I didn't use storyboards in those projects. Thus, I'm guessing there's something extra to do when using storyboards of which I'm just unaware. I'm using Xcode 4.5 and the iPhone 6.0 Simulator.
I wrote NSLog(#"View was loaded."); statement in the viewDidLoad method of my ViewController to make sure this view controller was actually loaded. (I know my button wouldn't show up if it was the wrong view controller, but I did this just to make sure.)
I also wrote a changeTitle: method in my ViewController to change the title of my button to New Title after it was pressed, just in case the button worked but its gradient just wouldn't respond to a tap. I linked this IBAction to my button, but it wasn't called.
In my ViewController, I created an IBOutlet of a UIButton which I connected to my button. In the viewDidLoad method of my ViewController, I changed the title of my button to New Title, this actually worked. The title of my button changed to this new title when launching my app in the iOS Simulator. The button itself still wasn't responding, though.
As a last try, I also wrote [button setEnabled:YES]; in my ViewController's viewDidLoad method, but this didn't help. My button still doesn't respond to any tap. What am I missing out on?
This is weird. I had an issue with my printer, so I restarted my computer. After this, this issue was suddenly solved as well (just like my printer issue). I'm not sure how this could have affected anything, but I'm glad it works again!
Ran into the same issue.
Apparently Content Reseting the Simulator worked for me
Very strange this..
Xcode 4.2 used to toggle between the header file and the .m file when you swiped up/down with 3 fingers in an editor window. Now excode 4.4.1 turns it into a text selection. Is there a way to change the default behavior to something else (in my case back to toggling between .h/.m)?
I got the 3 finger swipe working in Xcode 4.4 (I'm running Mountain Lion). It is possible. Try following these instructions: https://stackoverflow.com/a/7923619/472344.
I had already used these to get the 3 finger swipe working in Xcode 4.3 when I updated to Lion. It seemed to break when I updated to Xcode 4.4 and Mountain Lion. I went through all the steps again, but this time all the settings were already set correctly so I didn't have to change anything. However, now it's working for me. Give it a shot.
You can also switch between the .h and .m by using ctrl+command+UpArrow (or DownArrow).
I don't know if there is a way to change the gesture within Xcode, but usually i find if i open .h first, then .m (or the other way around) then you can swipe between them with 2 fingers right or left :)
As long as you open them in the centre and not in a new window =]