Is the order of view controller objects in the navigator pane relevant? - objective-c

I am just beginning to develop an app using Xcode 5 and am very much a newbie.
I have a project where I want the keyboard to hide after editing a UITextView object. I have compared it to a working project (Apple's Keyboard Accessory example) and the only difference I can see is the order of objects under the View Controller. I can't figure out how to reorder them, but I am not sure if it is a problem. It appears that the wrong object is being selected as First Responder.
I'd appreciate it if someone could tell me if it is relevant and if so how to reorder the objects.
I'm attaching screenshots of both View Controllers. The Water View Controller screen shot is mine and the other one is the Keyboard Accessory example.

In general it does not really matter the order you see them in Document Outline.
You can change the order by dragging them around.
However, sometimes changing the order of 2 items can make some details become invisible, so make sure you always check any changes you make.
Hope it helped

Related

Is there any way to allow for scrolling in for cells in a tableviewcontroller using storyboards in Xcode with Objective-c?

I have a standard tableview/coredata set up that fills (my own class defined) cells with users data as they enter it in. The only problem is, once there are too many cells to fit on the screen, the lower ones get cut off and are only visible once the top ones get deleted. Is there anyway to add the scroll feature now or is it too late (i have seen a few recommendations which involve either using xibs or using a view controller with a scrollbar feature).
I feel really stupid right now, but i do have the answer if anyone else comes across the same "problem". It turns out that scrolling is automatically enabled and while you cannot scroll down just from swiping down on the touchpad (macbook), actually clicking while scrolling down using the touchpad allows for scrolling (and will show scroll bar on the side, which is not visible unless it is in use)

Can't get a RightViewController to work with MEDynamicTransition

I'm trying to modify the TransitionFun example that comes with ECSlidingViewController to include a RightViewController.
I've basically added another ViewController, similar to the existing MenuViewController, that appears on a swipe to the left, (or from extra navigation item on Transition View Controller).
This works fine for the Default transitions but not for the others. Fold and Dynamic transitions jump and behave erratically, while the Zoom transition locks up the app!
(just to clarify - all the transitions initially work fine if I only use the existing left menu view - they only break after transitioning at least once to my new right view).
Has anyone managed to do anything similar? Maybe someone (Mike?) could update the demo to show how its done if possible?
Thanks

Full screen app with NSToolbar

This is hard for me to explain, so please bear with me for a minute.
In Xcode, if it is in full screen mode, showing the app's menu also moves the toolbar down. I have tried to make an NSView move and resize whenever the menu bar is shown, but I cannot figure out how to do it. I think this has something to do with and event, because setting struts and springs in Xcode does not make it move automatically. Can anybody help me figure out what the event is?
Edit: I just re-thought my question, and I have to make a correction. NSToolbar does this on it's own. I want a normal NSView to move and resize itself when the window goes into full screen mode.
I think you might be having the same issue as I was - if so, you need to call [NSToolbar setFullScreenAccessoryView:] on the "accessory view" you want to glue to the bottom of the NSToolbar.
Note that in windowed mode, your accessory view should take up space in the NSWindow's contentView just like any other view, but when you enter fullscreen mode you'll want to remove the accessory view somehow since Cocoa rips it out of your layout and leaves a gap unless you account for that.
I can certainly understand this issue being difficult to explain without having the background knowledge - I had the same problem. :)
Also see: How can I get a two-row toolbar like in Mail.app and Xcode?

Objective-C - What's techniques/objects are being used

On my iPhone, when I go into the Settings app, I see "Airplane Mode", "Wi-Fi", "Notifications", etc. and I'm able to scroll through pages and pages of settings.
I'm new to objective-c and I'm trying to duplicate the functionality in my own app, but I don't know enough about the objects and techniques to know what to ask or what to look for. :)
With that in mind, can someone please explain what's going on with the settings app? What is this using? Is it a UITableView that allows me to scroll down the page? What control is being used to store the text "Airplane" mode? What is happening when I click on the ">" and see a new page?
Any tips are appreciated.
While nobody outside Apple can be 100% sure how they implement their apps, some reasonable guesses would be:
The main screen is a grouped UITableView. Each entry is a single cell.
The text and images in the cells are built using properties of UITableViewCell (e.g. the textLabel UILabel for the text "General"). Some of the more advanced items use custom cell views.
Each category view is another UIViewController, pushed onto the viewControllers stack of a UINavigationController.
The on/off switches are UISliders.
It is a TableView
Table View programming Guide
samplecode
These docs cover all you need

Animating Tab Bar page switching

I'm quite confused with the whole animation stuff in iPhone SDK. I tried to study throught the SDK documentation, this website or tried googling it out without success.
I'm unable to get my scenario work.
I have single XIB file, with tab bar and a 4 tabs.
In a special event i want to switch from one page to another "in code", so I call eg: [tabController selectedIndex: 0].
I need this transition to be animated. Is there a way?
If user switches tabs manually, no animated transitions are needed
Also I have one subquestion:
In one of the tabs I have a UITableView with set of items. When user clicks any of these items, another set of items are beign shown (sort of hierarchy browser)
I tried to animate this transition using -deleteRowsAtIndexPaths:withRowAnimation: and -insertRowsAtIndexPaths:withRowAnimation:, but without luck.
Desired transition is shifting the old items set to the left side and the new items from the right side.
This is first time of my iPhone development, when I got lost even with all the forums and documentation. :)
Thanks in advance to anyone trying to help me!
As for your first question: Yes you can.
Try this link for some answer:
transition on tab bar sample code.
In short words: you should add a delegate object to handle the tab bar switching by setting the tabBarController.delegate = self.
Yet, what this forum post won't tell you is that you need to "import" some framework to do it.
First - right-click on the framework folder on the left hand list in Xcode and add an existing framework named: "QuartzCore.framework".
Than - add these lines to your tab bar holder (on .h file):
#import <QuartzCore/CAAnimation.h>
#import <QuartzCore/CAMediaTimingFunction.h>
As for your second question, try to replace the datasource (array or what ever) or create login function on the cell to replace its content.
Enjoy!
First Question: No, you can't animate tab switching. Please read Apple's Human Interface Guidelines on this. Tabs are meant to switch instantly. An animated transition would break the "tab" paradigm.
Second Question: When you tap on a row, the user does not expect other rows to disappear and new ones to appear. Instead, this sounds like a case for a UINavigationController. Please refer to Apple's sample code, specifically the UICatalog for sample code on how to implement this.