UIView is being pushed up after switching view?

Hi everyone,
I have been with this problem quite some time now and I have no idea on how to proceed.
I have three UIViews on my application (iphone). But when I change view, the view gets pushed up, not complying with the layout that was explicitly (supposedly) given to it with interface builder.
You can see the complete question here:
http://stackoverflow.com/questions/5080332/uiview-being-pushed-up-apparentlyinex plicably
If you need part of the code please let me know.

Note that in IB you have two distinct elements, a UIWindow and a UIView. You can change the size of the UIWindow, but you can for the UIView if no simulated items are specified.
In the view's inspector, under "Simulated User Interface Elements", you can add common GUI items (eg status bar , nav bar etc.) This is just a development aid, since it will resize your view by the right amount if you use any of these dropdowns, and grey out the W & H under view size.
If you turn off all the simulated items, the Interface builder lets you define the W & H for yourself.
The UIWindow is a fixed size, but having the status bar turned on might (not 100% sure since was a while ago) cause the views added to it be pushed down 44 pixels when loaded.
I remember having trouble doing a flip from one view to another, since the new view I loaded did not know that the first view was 44 pixels down, and appeared under the status bar.
You can get the full screen size with:
self.window.frame = [[UIScreen mainScreen] applicationFrame];
If you have a view that is not playing nice before you add it, you can push it's y value down beforehand
self.newVC = [[NewVC alloc] initWithNibName:@"NewVC" bundle:nil];
CGRect f = self.newVC.view.frame;
f.origin.y = 44;
self.newVC.view.frame = f;
[self.wrapperVC addSubview:self.newVC.view];
Don't think I needed the above, since managed to get it right in IB.
Worth checking what the frames for the window and views are in debug, and trying the settings in Interface builder. eg
po [UIScreen mainScreen]
or
p (CGRect) [[UIScreen mainScreen] bounds]
Hope that helps

Similar Messages

  • No push notifications after switching iPhone

    Hello everyone
    I switched my iPhone 4 32GB
    I had an iPhone 4 32GB with everything working fine. I gave that to my s.o. else due to Simlock problems (so we switched iPhones)
    I had my old iPhone running while restoring the "new" iPhone from a backup of the old iPhone.
    Afterwards I reset the old iPhone and gave it to my friend.
    Now I find, that I dont receive push notifications anymore...
    Any ideas whats the problem?
    I tried to activate/deactivate the notifications for all applications but it didn't help
    Best regards

    See this discussion

  • Email not being pushed after 5.1 iOS

    I noticed today for whatever reason, my emails are not automatically being pushed to my phone, unless I stay on the mail app. Iphone 4 with iOs 5.1 Exchange Email, Hotmail, and iCloud all exhibit the same behavoir. If mail is mimized it won't send, but if I go in and kill the mail app, then it pops up with notifications and emails just fine.

    Been battling this since the update myself - finally found the problem. It's not a bug.
    Settings -> Mail, Contacts, Calendars -> Fetch New Data -> Advanced -> iCloud -> Change to "Push".
    I have always received my emails automatically from iCloud, or they were always "Pushed" to me. For some reason, after updating to iOS 5.1, this setting was changed. It took me a while, but I finally found the problem. All emails are coming automatically now.
    Hope this helps!

  • OS X partition becomes corrupt after switching from Bootcamp

    So I've had to reinstall os x 10.9.1 no less than three  times this week and multiple times before in the past after switching between os x and windows 8.1. This usually happens after I've been using windows for a prolonged period then switch back to os x but it happened today after reinstalling os x from a time machine backup just yesterday. I'll switch between the two and os x becomes corrupt and begins the loading bar sequence after selecting the os x partition via the refit boot manager. I tried repairing the partition using disk utility from the repair partition and an external installation of os x 10.9.1 but every time the disk becomes corrupt and needs to be wiped and reinstalled or install a time machine backup. I've lost count of how many times I've had to do this and to make things even worse both of my external disks have become corrupt after being disconnected for two days while I sort this mess out. Does anyone else have similar issues or can locate an issue somewhere?

    Yeah I reinstalled osx 10.9.1 and installed all my apps, put everything back then used bootcamp to create a partition for windows then used wineclone to install my windows 8.1 backup. I jumped from windows > osx > windows > osx inside an hour to move around a few things and I forgot verify bootcamp after I installed the backup and that last time I booted to osx it was corrupted. I used disk utility from my external installation and the recovery partition and both times they need repaired which only came up with the backup and wipe notification window. There have been two occasions where I was able to fix the osx partition from my external osx installation and continue using osx quite perfectly but usually the partition becomes un-mountable after it fails to repair. Usually when this has happened the twenty something times before it's after a prolonged period of a few weeks using windows.
    I'm using refit boot manager and paragon NTFS 11 which may be the only software I've installed that could be corrupting the boot.
    SMART status is verified

  • Where clause one query not being pushed down

    I am having a problem where I cannot get a certain "optional" parameter to be pushed down to a query. The parameter gets applied in memory after the result set is returned but not pushed down to the DB. The function is as follows:
    declare function getFoo($key as xs:string, $optinalInput as xs:string*) as element(b:bar)*
    for $foo in f:getFoo()
    where $key = $foo/key
    where not(exists($optinalInput)) or $foo/optional = $optinalInput<- does not get pushed down to the query
    return $foo
    If I make optinalInput an xs:string instead of xs:string * and the optional parameter will get pushed to the query. The problem is for this optional parameter I could get anywhere from 0-50 in the sequence. Seems like when the parameter is a sequence it doesn't get applied to the query. Is there any way around this?

    Mike,
    I understand the difference between * and ? and I was one of the people working on the "string-length not getting pushed" problem so I am very familiar with it. I tried you solution that you mentioned below and it still did not push the where clause to the query. I know I could achieve this with an ad-hoc query but I wanted to do a pure xquery implementation of this component because of the benefits it could have when interacting with other components in our ODSI project...such as SQL joining and potentially pushing additional where clause down from components that call this component. The only way I did get this to kind of work is to do this:
    return
    for $o in $optinalInput
    for $foo in f:getFoo()
    where $key = $foo/key
    where $o = $foo/optional
    return
    $foo
    for $count in 1
    where not(exists($optinalInput))
    for $foo in f:getFoo()
    where $key = $foo/key
    return
    $foo
    By putting the optional parameter into a FOR statement above the table call it guarantees that at least one will exists and that's why the optional parameter gets pushed properly to the DB with a parameterized query. The problem with this is that even though a parameterized query gets pushed it will call the SQL statement multiple times!...not good.
    Another solution that was suggested to me would be to create the number of sequences for each item in the sequence and treat each item as it's own. For example if you know that the schema limits the sequence from 0..50 then you could make 50 items and 50 where clauses....probably not an optimal solution either but it would achieve properly pushing the where clause tot he DB.
    For now I am satisfied with this optional parameter not being pushed to the DB because the performance was still good but it would be nice if there was a maintainable pure xquery solution to this problem.
    Thanks for the help it's always appreciated!
    Mike

  • Disk permissions changed after switching off FileVault

    Hi,
    I found my disk permissions changed after switching off FileVault, nearly everything belongs to "system" now.
    Can anyone PLEASE tell me what permissions are standard for
    -Desktop
    -Applications
    -System
    -Libary
    ore doesn't it matter anyway ????
    Thanks a lot...

    Assuming you're just talking about the Owner being System then:
    The owner of Desktop should be your user name.
    Applications and System should be System. Since these are not in your Home folder these permissions would have been corrected when you ran Repair Disk Permissions.
    The Library folder depends on which Library folder you are talking about. If it's the Library folder that's in the same folder as System and Applications, then the Owner should be System, as well. Again, if that is not in your Home folder, then the permissions repair would have corrected it.
    If, however, it's the Library that's in your Home folder, then it should have your username as the Owner.
    Filevault only affects things that are in your Home folder so turning it on/off doesn't affect permissions anywhere else.

  • My new ipod touch goes dim after switching on for about a minute?

    my new ipod touch goes dim after switching on for about a minute?

    Settings > Brightness > Auto-Brightness (turn off)
    You're apparently in the hairy edge of ambient light being just barely dark enough to justify dimming the screen.

  • [iPhone SDK] Actions after showing view

    In my iPhone application I am switching views by clicking a button. But when I switch views, my application waits until the new view is done with loading. This is not what I want.
    I want my application to switch views and show the new view. After the view is shown I want to do the loading of my text/images/etc.
    I can't seem to find out what I need to do, to accomplish this.
    Is there some event that gets triggered after a view is completly visible?
    My view is a UIViewController.
    Message was edited by: Wim Haanstra

    I have had similar problems and have not been able to find any answers to this. I am calling addSubView in an action method. After the addSubView is called, I remove the previous view and then start doing some processing. However, it seems that it will not display the view until the whole method has finished processing. If I comment out the last couple lines of processing, it loads right away. I have also tried putting the processing code in the viewDidDisappear method but that also didn't work (it waited until I finished executing that method before it displayed my new view).
    Anyone have any suggestions out there?

  • Stopping data being 'pushed'

    Hi,
    Jus wondered what I need to switch off to stop any data being 'pushed' into cyberspace. Already turned off iCloud,Bluetooth and location services.... Anything else ?
    Thanks in advance.

    Synced means being kept up to date. If you change a reminder on an iPhone that information will be pushed through the cloud to a iPad and/or Mac and vice versa. If your email is iMap, email may be synced with the server through push or pull, but in either case the iPad needs to communicate and receive information from the server. To receive notifications, messages and facetime calls you need to have access to Apple's servers from your device.
    In the end, cutting off the data will severely hinder your ability to use the device. Many games won't work if they don't have connectivity to game center or the games servers for storing high scores and save states. Your apps that link to cloud storage services (Dropbox, OneDrive, Google Drive, etc) won't be able to sync and save your data.
    Put your iPad in Airplane mode and see what breaks. If you just want to turn off iCloud (based on your other posts) just go into Settings -> iCloud and start movingn the switches so none of them are green. That will stop all syncing with iCloud data services. Then go to Settings -> Notification Center and for each app listed you'll need to turn off notifications. Under Settings -> Privacy you'll probably want to go through each item and make sure you cut off data access for each of them. Under Settings -> Messages make sure you flip the switch so it's not green, and the same with Facetime. Under Safari in Settings turn on do not track and start cookie blocking.
    If I missed any I'll fill it in later.

  • Nokia CK-7W Car Kit won't switch off after switch...

    Hi,
    I have a CK-7W car kit (connected via bluetooth).
    Recently, the car kit has been reconnecting 2 to 3 seconds after switching the engine of the car off. I cannot seem to stop this from happening, even when clearing memory or even disconnecting the car battery for 20 mins.
    Any advice on how to reset the car kit would be helpful.
    Thanks,
    Chris

    Thanks for the response.
    The car kit was installed by a Car Phone Warehouse Nokia approved fitter about 4 years ago The kit has worked really well until recently!
    The contol button doesn't seem to be stuck in and responds as it should to button presses. In terms of the cable being squashed or damaged. Obviously there is a chance, but in actual fact, only an inch is on show before it is hidden behind the dashboard. In this instance I'm not sure what damage might occur since I don't know how to remove the dash!
    Apologies, I'm not certain I understand your comment re:
      -  "You can rule out the button by disconnecting it then starting the car and connecting, before switching off the car to see if the kit shuts down."
    How do I disconnect the button? Does it pull away from the lead / cable?
    Many, many thanks for your help,
    Chris

  • Why are we being pushed to upgrade to iOS 8 when it isn't compatible with Maverick?

    Why are we being pushed to upgrade to iOS 8 when it isn't compatible with Maverick? I just tried to open an iCloud document after upgrading to iOS 8 in all my Apple smart devices and OSX 10.9.5 on my MacBook Pro, only to be told that the new iCloud isn't compatible with Maverick and that I should upgrade to Yosemite. Problem is, Yosemite is only available as a Beta and won't have a public release until Oct. 21. Why would Apple cut its users off from iCloud like this?

    plotdot wrote:
    Checking with my better half, I'm now even more perturbed. According the the iCloud Drive FAQ, it's compatible with PCs running Windows 7. The current Windows OS is 8, which means Apple made iCloud backwardly compatible with Windows, for PC users, but not for its own customers. That *****.
    iTunes customers are Apple customers, what are you going on about?

  • Why have many of my add-ons and extensions been disabled after switching to firefox 6

    Many of my add-ons and extensions have been disabled after switching to Firefox 6.
    None of the Java extensions can be used;
    my Microsoft frame is disabled;
    my media player is gone;
    and my google toolbar with all of my important bookmarks is missing.
    How can Firefox 6 be considered an "upgrade"?
    How can I '''retrieve Firefox 4 or 5'?''--there's no point in using a browser that limits so many necessary add-on sites!

    Hi, mhaoo7--
    Tried your plugins updating suggestion; no go.
    Then tried updating to FF7.
    This time the Yahoo! toolbar was no longer compatible with FF.
    Scoured sites discussing problems with versions 6 & 7
    and decided to retire to version 3.6.19.
    Now both Google and Yahoo! toolbars are re-installed and
    working....Only deficit may be that FF no longer supports or
    soon will not support this version.
    I have stashed all of my necessary bookmarks on Google's toolbar;
    I like its drop-down menu as it doesn't change the page/window I'm
    in the process of using;
    I don't want to see that menu listed separately in a new window (too chaotic).
    Same for the Google dictionary and Thesaurus, which are straightforward
    and easy to use, again requiring nothing more complicated than a drop-down menu
    to search for words and concepts.
    --I checked Firefox 6 and 7's Dictionary/Thesaurus options but unfortunately
    found none.
    So if Firefox continues to upgrade with diminished returns, I'll likely have to go
    to Google Chrome.
    Would rather not do that.
    Maybe I can keep FF 3.6.19 without incurring nasty repercussions.
    Hope so.
    Have enjoyed being with Firefox for a few years.
    Thank you for your attention.
    marlem388

  • IPhone 4s Voice mail notification not working after switching from Verizon to PagePlus.

    iPhone 4s Voice mail notification not working after switching from Verizon to PagePlus.  How can I get the notifications working?

    Contact your carrier - voicemail, and visual voicemail, is a carrier feature.

  • Display flickering after switching laptop on, display flickering after switching laptop on

    after switching on my laptop the screen starts flickering.

    after switching on my laptop the screen starts flickering.

  • How do I find the address -thread - of a file. I used to use spotlight but after switching to Mountain Lion it no longer gives me this.

    How do I find the address -thread - of a file. I used to use spotlight but after switching to Mountain Lion it no longer gives me this.

    Hold Command-Option while pointing to an item in the Spotlight list. Or Command-Click will show the item in the Finder.

Maybe you are looking for

  • Report with piped Column incl. html-code

    Hi, I have a SQL Report with a table based function behind, like: SELECT * FROM table(my_function()); One of the column in this report is with html-code. In the Column Attributes of this column I have changed the "Display As" to "Standard Report Colu

  • XML publisher multiple templates in a single report

    Hello We are currently implementing PeopleSoft benefits where the user will have an option to select a benefit template from multiple selections and create a report form based from the combination of template he selected. My question would be based f

  • Errors in Data Collection

    Hi All, I have 2 Exceptions in the Early Watch Report under Service Preparation Section which are : Errors in Data Collection Function Name - Exception DB6_TABLE_MAX_GROWTH_NEW - NO_HISTORY_FOUND DB6_TABLE_MAX_SIZE_NEW---- NO_HISTORY_FOUND I don't kn

  • How to see adobe flash player files in iPad 2?

    How to see adobe flash player files in iPad 2?

  • Parent WBS - find children

    Hi I need to find children for a parent WBS, is there any FM/BAPI or is there any table I can check?