Navigate in Xcode between UI to is related controller and from controller to UI - swift

In the Android Studio, every view have a separate file and user can go from Java file to its view file by click on this
setViewContant(R.layout.my_view);
Is there is any way in Xcode that can take user form viewController.swift to is related layout file. Because it's totally Spaghetti in Main.Storyboard

Unfortunately I don't remember a better way than just search the ViewController class name.
Right-click on the ViewController class name
Select "Find Selected Text in Workspace"
In the left panel will appear the list of files which have occurrences of the searched word
Select the entry in your storyboard
btw: I would suggest to split the Main.storyboard in smaller ones! ;)

Related

App binary rejection because of missing storyboard file?

I got this email from Apple:
We have discovered one or more issues with your recent delivery for "App Name Here". To process your delivery, the following issues must be corrected:
Missing Storyboard File - The referenced storyboard file 'Pass_iPhone.storyboard.storyboardc' was not found in the application bundle.
I don't understand the issue, my storyboard is visible in my project and is editable ect? What can I do to fix this?
I'm not sure if this is your problem, but one thing to check: With the storyboard file selected in the Xcode Project Navigator on the left side, click on the File Inspector tab in the Utilities panel on the right side and make sure your storyboard file has the check box selected for your project under Target Membership. If it is not selected, the file will not be included in the app bundle, although it will still be editable.

Xcode Base internationalization doesn't work

I'm trying to localize my app.
I noticed that if I add a language every localized file become doubled.
In this way it's impossible to maintain code or storyboard so I learnt that I need Base internationalization.
The problem is that when I select that checkbox in xcode project setting it shows a window without nothing to select, does anyone know how to fix this?
Here's a screenshot
First, you need to go to your storyboard file, open the bar on the right side, and go to Show the File Inspector, the furthest tab to the left. Then, scroll down and click localize. After this, when you check Use Base Localization, you should see the storyboard appear.
This could happen if Base Internationalization was active before then disabled and files deleted manually.
Create Base.lproj folder in your project folder using the finder.
Move your main story board to it also using the finder.
fix the reference to it from Xcode.
remove app. from device, clean & build your project.
All will be back to normal.

new xib in xcode4

I develped an iPhone app. Now i would like to do it in iPad. To do this I have to create the new .XIB files and linked to his Class.
I don't know how to create a new .xib in xcode4. Could somebody help me?
Now, to solve this problem, I create a new file with his .XIB, delete the .m & .h and link the .XIB with my class.
Thanyou.
In order to create a XIB file in XCode 4, just go to the main menu, File->New->New File..., and from there choose User Interface from the iOS section. Then choose View (if that's what you want), device family and finally save.
Hope it helps.
We also need two more nib files, one for each of the two content views we just created. To create these, single-click the Resources folder in the Groups & Files pane so that we create them in the correct place, and then press ␣N or select New File... from the File menu again. This time, when the assistant window comes up, select User Interfaces under the iPhone OS
heading in the left pane .
Select the icon for the View XIB template, which will create a nib with a content view, and then click the Next button. When prompted for a filename, type BlueView.xib. Repeat the steps to create a second nib file called YellowView.xib. Once you’ve done that, you have all the files you need. It’s time to start hooking everything together.

adding one project class files with xib on one tabbar

is it possible to add one xcode project into other project? I have a project with three .xib files and need to add into other and to open all its functionality first tab.is it possible??
just drag them to ur project and popup will come and tick in copybox....that it and with reference type default

View Window Not Opening in Interface Builder

When I double click the XIB file in Xcode, Interface Builder typically launches a few different windows, one of which is the View window. For some reason, however, the View window isn't opening for one of my XIB files. If I open any of the other XIB files, however, the View window does open.
I'm not sure if there's a way to manually launch the View window (I looked through all of the menu items and couldn't find a way) or if I broke something in my XIB.
Update: I created a connection from the app delegate to a navigation controller, which seemed to break something. When I cleared that connection, the View window came back.
Are you referring to the window which allows you to view the objects in your XIB, or are you referring to the window which represents your XIB's primary view or window?
If you're referring to the main window which allows you to view the objects in your XIB, it sounds like you're most likely corrupted. I say this because that window represents the XIB file in whole, and if it isn't open, the file's probably not open. (Pro tip: Check the Window menu and see if the file name is listed in the file list. If it's not, it's not open. If it is, it is open and perhaps off-screen -- this has happened to me in the past when I've switched from a multi-monitor setup to just the laptop screen.)
If you're referring to a View or Window inside the XIB, double-click its icon from the XIB's main window.
I double clicked it and nothing happened. It just selected the window, wherever it may be and that's it. I tried Window -> Bring all to front and nothing.
Finally, I managed to recreate the problem. Usually I keep Xcode on my main screen and IB on my other monitor. If I close IB with my UIView there, disconnect the external monitor then start IB again, the said view disappears. Maybe it just slipped somebody's mind until now. I tried enabling expose, but it wasn't on that screen either. I couldn't bring the view back until I connected the external monitor again.
Hope that helps!
I had the exact same problem with opening a .xib file in Xcode and not being able to find the View window (that shows the application UI). Here was how I fixed the problem in my situation ... Open the .xib file, select the View object, go to the Tools menu and select Reveal in Workspace .. for me, this opened up the View window. Good Luck!
UPDATE - Or you can just double click the View object instead of going to the Tools menu - I think the first response suggested doing this, though that wasn't clear to me until after I posted this response.
I had the same problem. I fiddled with Deployment Target (changed from iPhone 4 to iPhone 3.2) and Development Target (changed from Interface Builder 3.2 to Interface Builder 3.0) for the xib file. It works wel now.
I solved this problem by playing around with my display settings. I had my iPad connected to my MacBook using Air Display. Disconnecting the iPad with Interface Builder windows left on it seems to leave those windows in "la-la land." Even re-connecting the device didn't seem to work. I had to open the Display preferences, choose "Detect Displays" and then choose "Mirror Displays". After that I de-selected "Mirror Displays" and closed out Interface Builder. Opening Interface Builder again brought the window back, but it was on my external display.
I think this is a bug in the sense that Apple should figure out a way to put all the windows back on the main screen once you detach the external one.