UISplitViewController in a TabBar ios6 - objective-c

I am aware that Apple have previously stated that UISplitView controllers should not be used within a TabBarController by reading through other posts on stackoverflow - I had a look at the relevant documentation on this in the Apple developer site, but I couldn't find anything to suggest this shouldn't be done.
I know that in previous versions it was due to the fact that the SplitViewController did not properly receive the orientation messages - however my app is always in landscape mode.
I have 9 split view controllers - and if I had to change this now it would be a major re-design for my app - infact I am not too sure of another way of displaying the data in a format I require!
Does anyone have any experience of this situation being accepted by Apple in an app recently? I am just concerned as there are so many posts (from 2010 onwards) saying this must never be done, but when looking at the SDK documentation I can't see why not.

The UISplitViewController itself is not allowed to be included in navigation controller or tabbarcontroller. I used the MGSplitViewController, from MGSplitViewController, however I haven't submitted it to Apple Store yet.
MGSplitViewController is of class UIViewController so you get to include it in a tab bar.

Related

ios 7 - transparency in IB not working correctly? setting transparency programmatically also isn't working?

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!

Auto-layout mangles the segues in the iPad version

After a number of tests I found that a normal working iPad storyboard starts working weirdly upon introducing auto-layout. In particular it seems not to properly pop-up dismissed views by always recycling the same view controller and to also badly handle the queue of instantiated view controllers. When I disable auto-layout everything works fine again. Does anyone know if this bug is known to Apple or there is a fix?
Not been able to complement the question with new information, I posted a new one at:
Triggering segues from annotations

Create custom animated segue with images?

I am trying to build a custom segue for an iOS app that utilizes images on the top and bottom of the screen (like a header and footer) that will slide up/down (out), transition to the next page, then slide back in. I found a simple tutorial that does the animation that I would like to use, but I am stuck trying to implement it into a segue.
Is this possible? If so, how? I have barely found any documentation on what I would like to do, and I am royally stuck!
Thanks in advance.
Animation tutorial: http://www.raywenderlich.com/2454/how-to-use-uiview-animation-tutorial
iOS 7
What you're asking about is possible with new APIs. However, iOS 7 is currently under NDA. Please avoid asking iOS 7 related questions on Stack Overflow until the SDK, Toolchain, and OS go final. Ask this question on the iOS Developer Forums. When iOS 7 becomes public, I'll edit this answer to describe how to do it.
Meanwhile (since you're a registered developer), I can point you to a few resources that may be of interest (you may need to sign in to access them).
WWDC Videos
The video titled Building User Interfaces for iOS 7 introduces the new Segue animations and techniques. The part of interest is around the 18:30 minute mark.
The video titled Custom Transitions using View Controllers goes in depth to explain the new custom animated segues and how to use them.
Creating Custom Segues - Pre-release documentation
Posts about Segue's on the Dev Forums - Just search the Developer Forums
iOS 5 - 6
Creating custom segues in earlier versions of iOS (5.0 and up) is fairly straightforward, unlike iOS 7 - the animations can't really interact with views within your ViewController and they aren't as dynamic.
To setup a custom segue, you'll need to first create a subclass of uistoryboardsegue (Documentation Here). Override the perform method and add your own animation and drawing code:
- (void)perform {
//Add your own animation code here, then present the View Controller using that custom animation
[[self sourceViewController] presentModalViewController:[self destinationViewController] animated:NO];
}
Now that you've subclassed UIStoryboardSegue and created your own animation, you'll need to connect the segue in Interface Builder.
Create the Segue by Control-Dragging from the source view controller to the destination view controller.
Select custom from the list
Name the Segue by setting its Identifier (this way you can also call the segue using the performSegueWithIdentifier:sender:) method. Then set the Segue Class to the name of your UIStoryboardSegue subclass.

possibility of setting the Voice Over Cursor in Objective-C

I am programming a text-based RPG for Voice-Over users on the iPhone.
I've got multiple UIViews added to my viewcontroller for different events.
I often remove and add them to my main View.
My Question is as follows: is it possible to update the VoiceOver Cursor to focus on the first Element on the View so the User doesn't has to check every Time if there has happened something new?
I figured out that this happens in a Navigationcontroller.
Is there a functionality to do this?
By posting a UIAccessibilityLayoutChangedNotification, you inform VoiceOver that the layout of the screen has changed. You can also use UIAccessibilityAnnouncementNotification if you want to make a specific announcement.
UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, nil);
Reference: UIAccessibility Protocol Introduction, Notifications
You can't control the VoiceOver cursor in iOS 4 or 5. I wish you could, it would solve so many issues.
I think this will be possible with iOS 6. See this answer for more info on that: https://stackoverflow.com/a/11995385/1455770

Objective-C & Interface Builder for Dummies: How mix different controllers and transition between them?

I want to make an iPad application (I'm actually making it now, it's just not working...) where I start out with a login screen for the users and if they authenticate I want to transition to another screen which will have a TabBar.
Right now I have my iPadAppDelegate with a MainWindow XIB file. In MainWindow I have a SignInViewController which is matching a class and XIB file of the same names. The SignInViewControlelr XIB contains all the text fields and buttons the user needs to sign in.
If the user is authorized I want to transition to the screen with a TabBar, which is why I have a UITabBarController in MainWindow XIB, but I can't seem to transition to it.
Ultimatelly, I think I'm misunderstanding how Cocoa's version of MVC works (my MVC knowledge is limited to ASP.NET MVC since it was in v1 preview 1... And as I can see it right now there's big differences, but I am most likely very wrong, hence the misunderstanding). Perhaps I'm using too many controllers and too little views or just not placing them where they should be, let alone writing the code to interact with them...
I'd appreciate an explanation on how I should properly structure the controllers and views to get what I want to achieve. An app similar to what I want to do is the AT&T myWirelss app.
Help would be appreciated!
P.S. I've litereally been learning how to make iOS apps from watching the videos of xvitcoder on YouTube and further adding the functionality I need while asking questions on how to add the functionality I need. The videos are good (I think), but I'm trying to do something that isn't really explained by them (I think).
UPDATE
The code I ended up using, which works, although I'm not sure if its the proper way of doing it:
DashboardViewController *dashboardViewController = [[DashboardViewController alloc] initWithNibName:#"DashboardViewController" bundle:nil];
[appDelegate.window insertSubview:dashboardViewController.view aboveSubview:self.view];
[dashboardViewController release];
You may find the View Controller Programming Guide informative. Ultimately you can have a derivative of UIViewController that you use to internally manage your different views/view controllers or you may also utilize a UINavigationController.
A really good simple model of flipping between big views is provided by the "Utility Application" of the iPhone templates. It shows how a view controller can call another controller. This might give you a start.