PaddyO
Lost but trying
Profile
Posts: 189
Reg: Sep 11, 2013
Geelong
5,190
03/24/14 02:35 PM (10 years ago)

xib element position different to simulator result

Hi all, I'm modifying a plugin by using a xib file, building it in the Xcode interface builder. I'm having trouble getting an element to sit where I want it to. Here's how it looks when I run it on the simulator: https://dl.dropboxusercontent.com/u/43652415/Screen%20Shot%202014-03-24%20at%205.15.35%20pm.png I know that the search bar is sitting behind the Control-Panel-specified content (a remote URL) because as you can see in the pic, I've moved the webview around (changed code inside the plugin file)to reveal the search bar behind it. What I want is to move the search bar up to the top of the screen, but no matter where I locate it in the interface builder it stays exactly centred halfway down the screen on the simulator! I've fiddled with offsets and positioning for the search bar and these move it around fine in the interface builder, but to no avail - it always stays in this central position when I run the app. Any ideas?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/24/14 03:17 PM (10 years ago)
http://www.buzztouch.com/forum/thread.php?fid=8141686AE67034BA6B6C15C&tid=8141686AE67034BA6B6C15C I get the same thing. And periodically still do. It's annoying. This is a partial solution… Cheers! -- Smug
 
PaddyO
Lost but trying
Profile
Posts: 189
Reg: Sep 11, 2013
Geelong
5,190
like
03/24/14 04:43 PM (10 years ago)
Hey Smug - yes, it is annoying but somehow knowing that it's not just me makes it slightly less so. Thank you! If I understand what you've done, it's basically going to require a few combinations of builds for different iOS versions, and I'll need to reset my simulator settings to test each of these. Is that right? Btw, is there anything you don't know how to fix? ;) [ Xcode is not my friend today, no sir. I just broke my app by stupidly saving the project in Xcode while it had a nib file in, then deleted the nib file, now it's crashing because it can't find it, even after a clean. :( ] Cheers Paddy.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/24/14 07:08 PM (10 years ago)
Well, once the settings are in the xib, you shouldn't have to change it each time… each xib will have it's own settings. But if you're using different xibs for different OS versions, then you'll have to write your own code to test for which iOS version, and then load the xib accordingly. With the crashing thing, remove the class/plugin you referenced it from, and then re-add it. Cheers! -- Smug
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
03/24/14 10:36 PM (10 years ago)
PaddyO, it's so great to have you asking these great questions. And Smug, you always have such insightful answers! I'm learning a lot reading your posts.
 
PaddyO
Lost but trying
Profile
Posts: 189
Reg: Sep 11, 2013
Geelong
5,190
like
03/24/14 11:27 PM (10 years ago)
Hey Smug, nah, I really killed it. Deleting and re-adding the plugin didn't change anything. A bit of a comedy of errors really, including an Xcode error message 3 pages long that asked me to delete something in my Libray folder and then change a header file... which of course was always doomed to give a bad outcome... and it did. Once I'd deleted it, Xcode spat the dummy about not being able to find it!! Fortunately I was able to save every little code mod in a big folder of text files before Xcode fell over for good. :) Wipe, rinse, repeat. 5.1 now installed, all running smoothly again!! (Thanks Susan, I'm learning heaps here. :)) Cheers Paddy.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.