I'm using XCode 4.6 and interface builder. I've got a UIViewController in interface builder, and a UIScrollView on top within the UIViewController. The scroll view completely spans the view controller (actually, it's taller than the view controller, it has height that is below the bottom of the view controller). This has been working for sometime, but I just ran into a problem. Somehow, I can no longer grasp the scroll view to drag it and reposition it. I click on the scroll view in IB or within the outline but the "hand" icon will not appear to enable movement and repositioning of the scroll view. Ideas?
I'd really rather not re-create all the detailed views within the scroll view. Perhaps this is why some people have a negative attitude about IB? Loosing work because of silly problems that stop you dead.
Thanks,
Chris.
I think I've solved this now. I believe there was supposed to be three layers: (from top to bottom; top towards user) scroll view, view (), and view controller. Somehow I lost the view in the middle () and this was not letting me resize the scroll view.
Related
Guys I am trying to make an application involving a tableview. I want my program to run a certain method when the user is scrolling, stopped scrolling, or scrolled to the bottom of the page in the TableView. I was trying to the use the on Scroll, on Scroll Finished in Scene Builder, but nothing happens.
enter image description here
enter image description here
I'm pretty new to iOS development and I'm having some trouble with navigation controller and a collection view as a Subview.
Ive started my project with a single view application and embedded in a Navigation controller (The Navigation controller root is my ViewController).
Inside my view controller i've added a Collection view with a custom cell (it doesn't take the whole screen).
when I run my application everything works fine.
when I tried to set the method
navigationController?.hidesBarsOnSwipe = true
nothing happens inside my Collection view even though I'm scrolling, but if I swipe within the View controller and not the Collection view the method works and the Navigation bar gets hidden just fine.
I want the method to work when I swipe inside the Collection view.
Thank...
If your collection view top is set to the top layout guide top then the view behind is has never scrolled, i.e. your view isn't scrolling so the navigation bar is not hiding.
Try setting your collection view top to the "Top Layout Guide.Top". Try changing this to "Superview.Top".
When in landscape mode, the UISplitViewController displays the detail and master views.
The detail view has an AdBanner in it. However, when we set the AdBanner's CurrentContentSizeIdentifier to SizeIdentifierLandscape the banner is too wide for the detail view.
How can we put AdBanners in the Detail view of a UISplitViewController?
If a banner with ADBannerContentSizeIdentifierPortrait fits, you could use that.
Or you could put the ad banner view on top of the UISplitViewController's view in the UIWindow and construct your sub-controllers in such a way that it looks right with the ad banner overlapped, although that may give you other problems when it comes to orientation updates.
Or you could try adding the ad banner as a subview of the UISplitViewController's view, and possibly also adjust the positions of its other subviews to try to get things to not overlap, but this may or may not be allowed if you want your app approved for the app store.
Otherwise you're just out of luck.
Short Version:
"How do you get a simple UITable drill down UINavigationController-styled non-full-screen modal dialog on the iPad?"
Long version:
I have a very specific set of requirements that I can't seem to get working...
I have a functioning iPad program that that needs to pop up a non-full-screen modal view. This modal needs to have a navigation controller and a simple drill-down table that displays a detailed view that I can have edit some values related to the selected item in the table.
Of course I am looking to have the regular "Back" and "Delete" buttons in the Navigation Bar.
I can handle the detailed view, what I am having issues with:
Non-full-screen popup (mine is
always full screen no matter what I
try).
The Navigation controller will not display the Table View I tell it to and the navigation bar does not even have the title I assigned to it in IB.
I can't seem to get any of this working. If anyone has a step by step example of how to do this, that would be great,
~Eric
P.S. I am not afraid of doing this 100% programmatically, but all the examples I have been trying to follow (and failing at extending to my problem) use IB.
As for the fullscreen issue, you need to set modalPresentationStyle to UIModalPresentationFormSheet or UIModalPresentationPageSheet on the controller you want to present modally. I'm not sure of a way to do this through IB.
As for your navigation controller/table view, I think more information is needed to provide an answer.
I tried to solve this in so many ways but always failed.
Basically what I need is a NavigationController with a customized NavigationBar (different height and smaller back Button) which I already achieved.
This creats two problems. If I use the default NavigationBar of the NavigationController, I have a smaller NavigationBar but the views of the pushed ViewControllers still position as if the NavBar would have the usual height. If on the other hand I use my a self created NavBar and hide the default one, then the views of the pushed ViewControllers position as if I wouldn't have any NavBar at all. I don't know where to set the views frame. No matter where I try to set them, it doesn't work.
Is there any strategy without implementing an own NavigationController from scratch?
Not using nib files, dev for iphone OS 4.0 but will switch back to iphone OS 3 quite soon again.
Try using your own customized Navigation controller and setting the frame of the pushed view in its ViewWillAppear method.
Hiding the usual Navigation Controller will create problems. Its better NOT to use it completely if you do not intend to use it . But after doing that , you will have to use your customized Navigation controller in the project wheresoever.