uiscrollview

iPhone UIScrollView embedded UIView is clipped

Hello. I have an iPad UIView subclass (we'll call LargerUIView) with which I do a bunch of drawing via drawRect: once asked. That all appears to be working, and looks the way I like. I'm at the point now of trying to get scrolling working (just in the horizontal to begin), yet when I try to scroll, what shows below is black (ie, appears ...

iPhone SDK: How to centre content in a UIScrollView during setZoomScale?

I'm using a UIScrollView to show photos. If they are zoomed out so they are smaller than the scroll view in one dimension then the content is centred using contentInset and contentOffset. This all works fine for scrolling and manual zooming. However, if I use setZoomScale (with animated YES) then when zooming out the scroll view sets th...

Adding a header view to a UIWebView similar to Safari and Articles

I'd like to add a header view to an UIWebView similar to the address/search bar in MobileSafari and the excellent Articles.app by Sophia Teutschler. More precisely, I'd like to create a "pull to fix orientation" view above a UIWebView, just like in Articles. Articles does use a UIWebView, so it seems to be possible. Is there a way to acc...

Initialization of controllers in a for loop - leaking problem ?

Hey, I am creating a kinda gallery and for each gallery I created a view controller whose view is added to a scrollview (see code below) : GalleryViewController *galViewController; for (NSUInteger i = 0 ; i < [galleries count]; i++) { galViewController = [[GalleryViewController alloc] init]; galViewController.record = [galleri...

Best way to add a large chunk of text to a UIScrollView?

What is the best way to display a large chunk of text (taken from a .txt file in the app) in a UIScrollView so a user can scroll about it? Length of the text is variable. ...

How to remedy a UINavigationBar overlapping the top of my UIScrollView?

I am working with a TabBarController >> NavBarController UI. One of my UIViewControllers has a UIScrollView in it with some text (UITextField) in it. Problem is, the uppermost text in the UIScrollView is covered by the NavBar. How do I fix this? I am trying to manually adjust stuff in IB with mixed results but I want a more CERTAIN solut...

I am using CATiledLayer and UIScrollView, how can I dynamically set CATiledLayer properties?

Basically speaking I am making a map framework (like Route-me and Google Maps). I want to change some properties of CATiledLayers which are not documented. So I dont know if it is possible: I want to dynamically set properties of CATiledLayer, such as layer size, tile numbers, what conditions to trigger reloading tile source, and bindin...

iphone app scroll view is horizontal but i want it vertical - how do i change this?

Hi Folks, Got this code for a viewscroller from the apple developers site. @synthesize scrollView1, scrollView2; const CGFloat kScrollObjHeight = 467.0; const CGFloat kScrollObjWidth = 320.0; const NSUInteger kNumImages = 6; - (void)layoutScrollImages { UIImageView *view = nil; NSArray *subviews = [scrollView1 subvi...

How to create an image from a UIView / UIScrollView

Hi, I have an image in an UIScrollView, that can be scrolled and zoomed. When the user presses a button, I want the code to create an image from whatever part of the UIScrollView is inside an area I specify with a CGRect. I've seen code to crop UIImages, but I can't adapt it to do the same for a view, because it uses CGContextDrawImag...

how do i add two delegates to a ui element at run time?

Hi everyone, im trying to implement some behaviors when a mapview element scrolls... by coding a delegate for the scrollview inside of a mapview. so, right now, i got a pointer to the scroll view used by the map view in my code. however, i wish to set the delegate of this scroll view inside the map view, but the issue is that the ...

iPhone: scroll view with arbitrary page/"settling" boundaries?

Hi all, I'm trying to figure out if I can get what I want out of UIScrollView through some trickery or whether I need to roll my own scroll view: I have a series of items in row that I want to scroll through. One item should always be centered in the view, but other items should be visible to either side. In other words, I want normal s...

Mimic behaviour of UITableView section headers staying visible during scroll

When you have a sectioned, plain-style tableview on the iPhone, such as in the Contacts app, the section headers remain visible when you scroll past them until they are pushed offscreen by the next section header. Does anyone know how to achieve something like this in an ordinary scrollview? I already have one scrollview nested in anoth...

how to programatically set the current page for UIPageControl?

I have 3 "pages" (page 0, page 1, page 2) in a UIScrollView that are snapped to by finger swipes. There is a UIPageControl there too. The UIScrollView starts off presenting page 0. What I want to do is present page 3 FIRST sometimes. How can I do this programatically. Simply setting currentPage (of UIPageControl) to the page number doe...

UIScrollView and CATiledLayer question

I am using a CATiledLayer as content of UIScrollView, but seems I can not get the correct (sometimes) [scrollView contentSize] and [scrollView contentOffset] from CATiledLayer's delegate method : (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx I know CATiledLayer uses this method to render tile in a background thread. A...

UIScrollView with pages enabled and device rotation/orientation changes (MADNESS)

I'm having a hard time getting this right. I've got a UIScrollView, with paging enabled. It is managed by a view controller (MainViewController) and each page is managed by a PageViewController, its view added as a subview of the scrollView at the proper offset. Scrolling is left-right, for standard orientation iPhone app. Works well. B...

How to set UISCrollView's contentOffset during zooming(scrolling)?

I am dealing with UIScrollView and I need to dynamically set contentOffset. But I found it didn't work well if you set contentOffset during the zooming(scrolling) operation. It seems the touches will affect setting contentOffset. Any idea about this? ...

Hiding a navigation bar via scrolling (safari style)

After a page is loaded in Safari on the iPhone, when you begin scrolling down, the navigation bar is also scrolled out of view. When you scroll back up, the navigation scrolls back into view. I'm looking to implement this same behavior using a UIWebView underneath the UINavigationBar, but I'm guessing it should be possible with any UISc...

UIScrollview : scroll with 2 fingers and not one

Hello, I have a UIScrollView containing another wiew. This view need to handle single touch event for drawing. For this reason I would like to scroll using 2 fingers. I managed to get this working for 2.x SDK but it's no more working with 3.X series. Do you have idea/workaround for achieving this? Thanks in advance for your help :) ...

adding UIImageView to UIScrollView throws exception cocoa touch for iPad

I am a noob at OBJ-C :) I am trying to add a UIImageView to a UIScrollView to display a large image in my iPhone app. I have followed the tutorial here exactly: http://howtomakeiphoneapps.com/2009/12/how-to-use-uiscrollview-in-your-iphone-app/ The only difference is that in my App the View is in a seperate tab and I am using a dif...

Subclassing UIScrollView for drawing w/o views

I'm contemplating subclassing UIScrollView (the way UITextView does) to draw a fairly large amount of text (formatted in ways that NSTextView can't). So far the view won't actually scroll. I'm setting contentSize, and when I drag, I see the scroll indicator. But nothing changes (and I don't get a drawRect: message). An alternate approa...