I created a new empty Xcode project. And just added a NSSplitViewController to storyboard like below.
And I ran the application, found out that the main window looked like below.
The left split view was collapsed by default. I hoped it should be displayed like below:
And I was not set both split view item's collapsed property in Xcode.
Any one could help me to figure out what's wrong with my app?
Thank you very much for any help.
Try connecting the view outlet of the NSSplitViewController to the NSSplitView - this worked for me in a simple sample project.
If no-one comes along with a better answer, I'd consider filing this behaviour as a bug using Apple's Bug Reporter - either this connection should be configured by default, or it shouldn't be needed at all.
Related
still learning iOS development, want to create something like mention friend likes in Facebook / Instagram.
Mention People UI in Instagram
Is it using new TableViewController and add subview to the same View Controller? (in this case, CommentViewController) , but, when i already have UITAbleViewController in my CommentViewController, how can i handle the second tableviewcontroller?
Looking at the image you provided it looks as though the best way to implement this would be a UIViewController that has a UITableView added to it. Each tableview that is created can have a delegate and datasource set for it. When the textview detects that a mention is being entered (more about detecting this later) you would trigger a second tableview to appear as an additional view (subview) that overlays your current tableview (or as the accessory view of the keyboard, the way apple and others present a textview over the keyboard for text entry ex: messages app).
In order to manage the two tableviews my suggestion would be to create two additional classes each of which conform to the UITableViewDelegate and UITableViewData source. The first one would be the CommentsTableViewManager and the second would be the MentionsTableViewManager. The first tableview would set the CommentsTableViewManager as its delegate and datasource while the second would use the MentionsTableViewManager.
The other problem you may run into later on is determining how to properly detect mentions being typed into the textview. I've actually created an open source library that will help you with this problem. It's located here: https://github.com/szweier/SZMentionsSwift the README should provide enough information for you to get started if you choose to use it.
I hope the information about helps get you started with your app.
From architecture prospective it's way better to have a single table view with altered data source container, depending on current mode.
Speaking an instagram way - either you're showing comments, or, if # symbol was detected, displaying a list of users. So almost all your UITableView's delegate and data source methods will start with something like if (isMentionMode) and you'll choose specific cell class/cell's height/amount of rows per section/etc depends on isMentionMode state.
I'm working on a little private helper app on keeping track of refueling my car and stuff..
Everything just worked fine until I started the simulator...
Here's how the TableView looks in the StoryBoard:
http://i.imgur.com/Ov7F1CW.png
And here's how it looks on the iPhone or Simulator:
http://i.imgur.com/Cq1yUkK.png
I already tried fixed, freeform and inferred sizes for the ViewControllers-
no success..
How can this be?
What causes this?
Think there's a quite long story to get there but I would try to answer the very question you asked.
You have probably composed your storyboard table view scene with a 'Dynamic Prototypes' content and then all the cells we can see in the storyboard are just namely prototypes, which can be used in runtime programmatically.
In order to make a scene in a wysiwyg manner, you should choose 'Static Cells' option instead.
Here's the answer. I was using "Size Classes" on my very first Navigation Controller.
Don't ask me why all my other Tabled didn't get messed up, but this was the solution for me.
Thanks for Your help! :)
I have created two UIViewControllers in IB.
PROBLEM 1: I can't make the 2. VC transparent.
I have read a lot of stackOverFlow solutions but nothing seems to work in my case.
I have tried the following setup in IB both in my current project and in this simple project and something strange occurs (IB,for 2.VC):
Setting the alpha value below 0,5
Setting opaque to "checked"
Setting the background color to "black"
https://imageshack.com/i/kqdXWk9Jp
The second VC gets pushed when I click "GO TO NEXT VC" (push or modally , doesn't matter) and while he is being pushed I see the the result I want:
https://imageshack.com/i/idXUCFCPp
... and when the push is finished the new VC changes from being transparent to black (not transparent):
https://imageshack.com/i/iqmLw8D1p
I have no clue why this is happening and I cant get it to stop working like that.
Q1: Why is this happening?
Q2: Why can't I change the properties of the views programmatically when the views are created with IB?
I have done this thousand times WITHOUT using IB. As soon as I start using IB things don't work like they are supposed especially when I try to edit stuff programmatically.
When I do all of these steps without IB only in code everything works perfectly fine but I need to use the IB in my next project. I am using Xcode 5.1.1. on mac mini (late 2009) with Mavericks.
Sorry for bad English.
Your problem is because the memory management of iOS removes the previous interface ViewController, to save resources.
After iOS7, you can customize the transition viewControllers. Please read: UIViewControllerAnimatedTransitioning Protocol Reference.
I also had the same problem and managed to solve it by following the tutorial Custom UIViewController Transitions.
If you are still having doubts, there is another tutorial to help you: iOS7: Custom Transitions.
Hope you get success!
I have been using the storyboard to make an application and currently there are many segues and several components. This is causing a ton of lag when I try to do anything inside the storyboard. Is there a way to hide components inside the storyboard? thanks.
+1, For the potentially features to improve Xcode. Now, there is no way you can hide those views (Not that I know). But I would suggest you to,
Hide the debug areas you don't need.
Hide the document outline while working with segues.
Why?
I think in this way whenever you are making changes, system does not have to repaint those unwanted views and long document outline. Probably this will be less laggy(I don't think there is a word like this)!
Work around
Divide your segue into different meta segues and then you can call those segues from your main segue. In that way you don't have to put each connection on one file but you condense it!
And here we go the documentation for it! Now you can get the story board by different file and then initiate with the UIViewController easily. Then you can just use old ways to segue between different ViewControllers.
Apple Documentation for UIStoryboard
Demo App.
In order to achieve this, I have made a quick demo application which will help any future visitors.
https://github.com/Krutarth/LargeStoryboardManagement
Visually something like this,
You can split one huge storyboard into multiple small storyboards.
Select the view controllers that you want to move to a smaller storyboard, then
In the top menu, click Editor -> Refactor to Storyboard
Save the new storyboard with the desired name. XCode will auto generate all the required storyboard links from your large storyboard to this newly created small one.
I am developing an app for the iPad, using split-view and storyboards. I did this once before quite a while ago but didn't write down how to do it. I've googled and SO'd all morning and found nothing specifically targeting my question.
I know there is a way to add multiple detail views by dragging objects to the storyboard canvas, and somehow (that's the question) setting the new object as either master or detail...
Anybody know how to do that?
I give up... decided to go to with a tab bar controller; much simpler. And the fact that it got voted down indicates to me nobody knows the answer.
Thanks anyway to all who looked at it.