TableView looks strange in Simulator & on iPhone - objective-c

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! :)

Related

NSSplitViewItem does not display like it designed in IB

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.

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!

How to add multiple views to a split-view controller?

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.

XCode 4. Keyboard doesn't hide on iPad

I have a problem with my iPad app.
I perform authorization in social networks (facebook, twitter etc.) to post information from app. Several webviews change each other (login, content of post, captcha). They have text fields and I have to show keyboard. After posting I return to some start view with posted information.
It works good, but after posting first news something goes wrong. When I post news one more time, after return keyboard is still on the screen.
I saw here some questions familiar to this, but they wasn't useful.
I tried to make resignFirstRersponder to all webViews, textFields and textViews. Also i\I tried to implement method disablesAutomaticKeyboardDismissal but it doesn't help me.
I don't know where search for problem...
So questions are: why could this happened? How can I solve this? fnd How can I get some information about keyboard? (is it visible, what object has focus etc., anything that could be useful to solve problem)
And one more thing. I have similar app for iPhone and it seems to work correct.
Try this:
[searchBar performSelector:#selector(resignFirstResponder) withObject:nil afterDelay:0.1];
Make sure to replace searchBar with the object that is the actual First responder in your case
Problem is fixed, finally. The reason was the way I had changed visible view. I set a new value to view property of ViewController. And as previous view contains text field with focus on it, focus wasn't lost before changing view (and keyboard was still on the screen), but I had lost handler to previous view.
Solution is: resignFirstResponder to all (or current) inputs BEFORE changing view.
Hope, it's clear. Thanks for your help!

iPad SplitView with navigation stack for multiple view controllers

Hey,
my starting point was this
MultipleDetailViews sample code found on xcode.
I am trying to create a separate navigation stack for the First- and SecondDetailViewController in order to push new view controllers.
A great help was this tutorial but I still couldn't manage to include the navigation stacks.
I have been stuck on this problem for a while and wonder if there exists a simple solution...
Thanks in advance for any suggestions.
In the sample code, try to open the MainWindow.xib (en) and remove the 'FirstDetailViewController', replace it with a NavigationController, add the rootViewController for this new detail NavigationController and you are good to go.
I guess that you know what to do next. Hope it helps.
looking at this believe i had exactly the same problem and never found a way around it, until a couple of days when i was watching an unrelated lecture off of iTunes U, anyway in the new view controller that you load, have you implemented the UISplitViewControllerDelegate, (if this doesn't work have you tried moving the UISplitViewControllerDelegate to the master controller)?