I've implemented an iphone app with a page controller following Apple's code example. There are only 3 views on the page controller. The app works fine on normal screens, but when I test it on retina devices, there is a visible lag when scrolling either horizontally or vertically in any of the views. Any ideas of what the problem might be or how can I "debug" this?
The content of 2 of the views is a table view and on the third view I'm using CorePlot. The network is not used while scrolling.
The amount of data loaded and drawn during the scroll makes your device choking. Try to load those views in other thread using gcd and blocks.
I was adding a shadow around the 3 views and that's what was making the scrolling slow.
Related
I am working on an ipad app where I need the functionality similar the ipad screen shots in this app:
TSN: iPad Edition
basically where I could scroll through many subviews on one single screen, even some subviews could come on the top of each other and then can be closed.
the first idea which came to mind was to insert multiple subviews in a UIScrollView and then do a simple scroll but how do they scroll on top of each other etc.
Your screenshot seems very similar to CLCascade library. You can find it in github at address: https://github.com/appunite/CLCascade. In the linked image there's a screenshot of the example.
beware that trunk is not so up to date, take a look at branches to see what fits better your needs.
One of the more impressive iOS app that I've come across is Jetsetter's due to its great design, incredible interface, and creative uses of animation. One of my favorite components of the app is the teaser photo interface they have for the hotels/venues. They provide a minimized photo slideshow, but if you want the full view you can click it and it expands to expose a larger version of the image. You can see a blurry video of this in action here.
I'm interested in recreating something similar. I'm well aware of the paged galleries like MHPagingScrollview (which is how the larger photo viewer functions), yet what I'm trying to figure out is the proper way to handle the transition. I've also seen libraries that handle the Ken Burns effect for images. However what is not clear is whether or not there are separate view controllers.
Is this a transition between two separate view controllers? Or would the minimized and maximized photo viewer be part of the same controller? How would you most efficiently replicate something similar? I've embedded a screen shot below to illustrate the before and after. The video linked above however most effectively illustrates this transition.
Mobile engineer from Jetsetter here. They are two separate controllers, but the transition animation occurs in the first. Here's the flow:
A user taps the smaller photo.
A transition view containing the full size image is placed directly on top of the smaller image.
The transition view animates to the bounds of the screen.
The photo viewer controller is presented as a modal without animation, completing the effect in one seamless animation.
The effect is reversed when the modal controller is dismissed.
The trick lies in your transition view. We created a UIView subclass (with clipsToBounds enabled) that contains an imageView. The bounds of the transition view expands to reveal the imageView, resulting in no distortion of the final image during the animation.
I'm trying to make and iOS app with both portrait and landscape views, but if I open it and change the orientation to Landscape, some buttons got offscreen, after going to IB and reordering the buttons, in Portrait they go off screen.
After googling, I dont have ANY ideia how to 'change' views according to orientation.
Could you guys give me some help?
Ah, also, Apple Support Documents seems pretty useless to me :P
Thanks!
There a method - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{}
which is useful in such cases.
You should change autosizing properties in IB (they're in the same place where frame size is) or change autoresizingMask properties of your inner views and controls programmatically. This controls what happens to the elements of your screen after it gets resized (for example when the screen is rotating). You can glue your components to left or right or both, top or bottom or both and similar. Play with it, it's pretty powerful and you don't need any code for that if what they can do is enough.
My goal seems simple: Replicate the behavior of the iPad 2 camera app with regard to previewing/taking still photos. Namely, I want to display the preview in a full-screen window.
Unfortunately this seems impossible on the iPad 2 with a UIImagePickerController. A UIImagePickerController must be hosted within a UIPopoverController, and according to the docs:
When changing the size of the popover’s content, the width value you specify must be at least 320 points and no more than 600 points.
This is fairly consistent with the results I've been seeing. Regardless of the size I specify, I see a small preview window. Is there a way to get around this with the UIImagePickerController?
The docs are confusing/wrong on this. You can also present the camera full screen using a navigation controller with presentModalViewController. This is exactly the same as on iPhone.
Note, this only works on a device, not on the simulator.
does it hurt performance to have multiple UIWebViews in the same screen? how do I use a busy indicator while the web page is loading and display the fully loaded page once all contents have been downloaded?
Two UIWebViews will take twice the time to render on screen. If this is a problem depends on your app and your content. Just try it.
To implement your busy indicator you could implement a delegate for your WebViews. see UIWebViewDelegate-Protocol