Best practice for adjusting UIScrollView contentOffset in 'willTransitionToTraitCollection'

2015-11-10 Thread David Hoerl
I have a UIScrollView scrolled to the bottom of content - so the content bottom is at the bottom of the view - in a compact environment. When the view rotates to regular, the contentOffset is too large - so the bottom of the content appears in the middle of the view. Without hard coding nav

Re: UIScrollView question

2014-07-27 Thread Luther Baker
Thanks Quincey, First of all, you've got a good idea of what I'm trying to do - so for my first question about how to make the text view fill the remaining space, I think you're of the mindset that I'll need to manually calculate that distance and set an internal height constraint on the text view

Re: UIScrollView question

2014-07-26 Thread Quincey Morris
On Jul 26, 2014, at 22:19 , Luther Baker wrote: > Are you hoping that when the keyboard comes up -- it shortens the parent view > you are referring to? No, it’s more complicated than that, but I think it’s the *question* that’s complicated, more than the answer. First you have to decide what

Re: UIScrollView question

2014-07-26 Thread Luther Baker
Yep - I'm good with the keyboard part (ie: I can tell how much of the screen will disappear) ... > won’t a “bottom space to superview” Are you hoping that when the keyboard comes up -- it shortens the parent view you are referring to? To date, that has not been my experience. The keyboard just sh

Re: UIScrollView question

2014-07-26 Thread Quincey Morris
On Jul 26, 2014, at 21:09 , Quincey Morris wrote: > Isn’t the answer to this … Sorry, I quoted the wrong thing. I meant, isn’t the answer to the stuff about the keyboard in that documentation? Is the scroll view there only to deal with the case of the keyboard appearing? In that case, won’t

Re: UIScrollView question

2014-07-26 Thread Quincey Morris
On Jul 26, 2014, at 20:58 , Luther Baker wrote: > I have a pretty good frames based background but I'd like to consider an > iPhone screen done with AutoLayout on a UIScrollView such that the bottom > UITextView grows vertically to fill the vertical space remaining from the >

UIScrollView question

2014-07-26 Thread Luther Baker
I have a pretty good frames based background but I'd like to consider an iPhone screen done with AutoLayout on a UIScrollView such that the bottom UITextView grows vertically to fill the vertical space remaining from the text view to the bottom of the device. UIScrollView parent [

Re: UIScrollView contentSize question

2014-06-22 Thread Luther Baker
I've got that working in code ... thoughts on how to do this with storyboards? Or at least, I'd like to create the children views themselves in the storyboard. When I 'freeform' the view controller to allow me to show a UIScrollView that is 2 "pages" wide, binding

Re: UIScrollView contentSize question

2014-06-22 Thread Luther Baker
Yaay! On Sun, Jun 22, 2014 at 12:10 AM, Kyle Sluder wrote: > On Jun 21, 2014, at 9:13 PM, Luther Baker wrote: > > > > I want a 2-page horizontally scrolling UIScrollView on a simple > > UIViewController. Very similar to what Twitter does to swipe between > Home, &

Re: UIScrollView contentSize question

2014-06-21 Thread Kyle Sluder
On Jun 21, 2014, at 9:13 PM, Luther Baker wrote: > > I want a 2-page horizontally scrolling UIScrollView on a simple > UIViewController. Very similar to what Twitter does to swipe between Home, > Discover and Activity views. > > Using storyboards, dropping a UIScrollView on

UIScrollView contentSize question

2014-06-21 Thread Luther Baker
I want a 2-page horizontally scrolling UIScrollView on a simple UIViewController. Very similar to what Twitter does to swipe between Home, Discover and Activity views. Using storyboards, dropping a UIScrollView on a UIViewController is a piece of cake. Pinning the UIScrollView to the top and

Re: UICollectionViewCell and UIScrollView and autolayout

2014-05-26 Thread Kyle Sluder
> On May 26, 2014, at 12:10 PM, Luke Hiesterman wrote: > > That is fine, but the statement made in your original email said “autolayout > has assigned a frame to the cell.” You’re free to use autolayout inside the > content view - just don’t try to layout the cell itself. In practice, this res

Re: UICollectionViewCell and UIScrollView and autolayout

2014-05-26 Thread Torsten Curdt
Ah - so that was the `UICollectionViewFlowLayout` that did that (if understand you correctly)? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-de

Re: UICollectionViewCell and UIScrollView and autolayout

2014-05-26 Thread Luke Hiesterman
That is fine, but the statement made in your original email said “autolayout has assigned a frame to the cell.” You’re free to use autolayout inside the content view - just don’t try to layout the cell itself. Luke On May 26, 2014, at 9:07 AM, Torsten Curdt mailto:tcu...@vafer.org>> wrote: I

Re: UICollectionViewCell and UIScrollView and autolayout

2014-05-26 Thread Torsten Curdt
I am not assigning a frame - but I am indeed assigning constraints to the subviews of the UICollectionViewCell's content view: https://github.com/tcurdt/paging-and-zooming/blob/master/Paging/TCPagingView.m#L17 That is not supported? cheers, Torsten On Mon, May 26, 2014 at 5:59 PM, Luke Hiesterm

Re: UICollectionViewCell and UIScrollView and autolayout

2014-05-26 Thread Luke Hiesterman
Why is autolayout assigning a frame to the cell? Are you putting autolayout constraints on your cell? If so, shouldn’t be. The collection view assigns the cell’s frame (according to the wishes of the assigned collectionViewLayout). Setting the frame yourself, either by calling -setFrame or somet

Re: UICollectionViewCell and UIScrollView and autolayout

2014-05-26 Thread Torsten Curdt
OK, so it seems I explicitly need to call [cell setNeedsLayout]; [cell layoutIfNeeded]; after the cell is configured. I didn't think the `layoutIfNeeded` was necessary. That's a bit of a surprise. The centering of the `UIScrollView` is still a bit funky though. Ba

UICollectionViewCell and UIScrollView and autolayout

2014-05-26 Thread Torsten Curdt
https://github.com/tcurdt/paging-and-zooming/blob/master/Paging/TCPagingView.m#L159 autolayout has assigned a frame to the cell. But somehow the UIScrollView is still at CGRectZero ...and somehow I cannot convince autolayout to assign the proper frame. Oddly enough it still show the image thoug

Re: Animating UIScrollView frame change without moving contents

2014-02-20 Thread Rick Mann
On Feb 19, 2014, at 23:24 , Uli Kusterer wrote: > On 19 Feb 2014, at 21:17, Rick Mann wrote: >> On Feb 19, 2014, at 09:01 , Kyle Sluder wrote: >> >>> On Tue, Feb 18, 2014, at 06:00 PM, Rick Mann wrote: I tried to set the contentOffset in the same animation block, but that just makes

Re: Animating UIScrollView frame change without moving contents

2014-02-19 Thread Uli Kusterer
On 19 Feb 2014, at 21:17, Rick Mann wrote: > On Feb 19, 2014, at 09:01 , Kyle Sluder wrote: > >> On Tue, Feb 18, 2014, at 06:00 PM, Rick Mann wrote: >>> I tried to set the contentOffset in the same animation block, but that >>> just makes the content move smoothly. >> >> Don't move the scroll v

Re: Animating UIScrollView frame change without moving contents

2014-02-19 Thread Rick Mann
On Feb 19, 2014, at 12:23 , Kyle Sluder wrote: > On Wed, Feb 19, 2014, at 12:17 PM, Rick Mann wrote: >> I tried that, too. Same behavior. When you adjust the top of the left, >> the content moves relative to the top-left corner. I tried changing the >> contentOffset at the same time, to no avail

Re: Animating UIScrollView frame change without moving contents

2014-02-19 Thread Rick Mann
Sent from my iPhone On Feb 19, 2014, at 12:23, Kyle Sluder wrote: > On Wed, Feb 19, 2014, at 12:17 PM, Rick Mann wrote: >> I tried that, too. Same behavior. When you adjust the top of the left, >> the content moves relative to the top-left corner. I tried changing the >> contentOffset at the s

Re: Animating UIScrollView frame change without moving contents

2014-02-19 Thread Kyle Sluder
On Wed, Feb 19, 2014, at 12:17 PM, Rick Mann wrote: > I tried that, too. Same behavior. When you adjust the top of the left, > the content moves relative to the top-left corner. I tried changing the > contentOffset at the same time, to no avail. That sounds like a bug… you should be able to adjust

Re: Animating UIScrollView frame change without moving contents

2014-02-19 Thread Rick Mann
On Feb 19, 2014, at 09:01 , Kyle Sluder wrote: > On Tue, Feb 18, 2014, at 06:00 PM, Rick Mann wrote: >> I tried to set the contentOffset in the same animation block, but that >> just makes the content move smoothly. > > Don't move the scroll view. Have the banner appear over the scroll view > a

Re: Animating UIScrollView frame change without moving contents

2014-02-19 Thread Kyle Sluder
On Tue, Feb 18, 2014, at 06:00 PM, Rick Mann wrote: > I tried to set the contentOffset in the same animation block, but that > just makes the content move smoothly. Don't move the scroll view. Have the banner appear over the scroll view and change the scroll view's contentInset instead. > Exacerb

Animating UIScrollView frame change without moving contents

2014-02-18 Thread Rick Mann
Hi. I have a UIScrollView that contains an image that might be zoomed in. The top of the scroll view has an autolayout constraint to the bottom of a view that slides down from the top 100.0 pixels when shown. I do this by calling -layoutSubviews in an -animateWithDuration:animations: call after

Re: Paged UIScrollview is acting strange in iOS7?

2014-02-17 Thread Scott Andrew
, at 5:31 PM, Scott Andrew wrote: > I have some old gallery code that uses UIScrollView in a paged mode. We are > trying to port the code to iOS7 but when we are getting strange behavior. In > iOS7 we are constantly getting scrollViewDidScroll with weird offset of > negative o

Paged UIScrollview is acting strange in iOS7?

2014-02-17 Thread Scott Andrew
I have some old gallery code that uses UIScrollView in a paged mode. We are trying to port the code to iOS7 but when we are getting strange behavior. In iOS7 we are constantly getting scrollViewDidScroll with weird offset of negative or some large offset that has huge exponents. Is there a

Suggestions for handling complex UIScrollView overlay touch interactions?

2014-02-06 Thread Rick Mann
In my app I have a floorplan (an image) drawn in a UIScrollView. There are annotations on the floorplan that are drawn in a UIView that overlays the scroll view. I do this because I don't want the annotations to change size as the user zooms the scroll view, only position. I have a tap ge

UIScrollView Dynamic Paging Size

2013-10-03 Thread Peng Gu
354/uiscrollview-horizontal-paging-like-mobile-safari-tabs/1220605#1220605>suggests: I set the scrollview paging enabled, and set clipsToBounds to NO; In the * scrollViewDidEndDecelerating:* Method, I set the width of the scrollview to the displaying image's width. The problem is the contentOf

Wrapping Content of a UIScrollView

2013-10-03 Thread Dave
Hi, I have a subclass of UIScrollView which contains a bunch of image views. The requirement is for the Scroll View to "wrap" when the user scroll past the last image, e.g. if Scrolling Right when the last image is scrolled onto, to have the first image appear as if it is la

Prioritizing UIScrollView gestures over buttons

2013-08-15 Thread Rick Mann
I have a set of buttons that live above (not subviews of) a UIScrollView. I update their position based on feedback from the UIScrollView during pan and zoom. The problem is, the buttons are easy to tap accidentally when you're trying to pan or zoom. Is there a magic setting to let taps i

Re: UIScrollView to UIImage

2013-07-28 Thread David Duncan
The scroll view's bounds.origin is also its contentOffset, which is likely what is happening when you render it in to the context. However, you seem to imply that you just have a simple scroll view with a simple image inside – why do this at all? Instead just use the contentOffset to determine

Re: UIScrollView to UIImage

2013-07-28 Thread Trygve Inda
Update: CGRect rect = [scrollView bounds]; UIGraphicsBeginImageContextWithOptions(rect.size,YES,0.0f); CGContextRef context = UIGraphicsGetCurrentContext(); [scrollView.layer renderInContext:context]; UIImage *capturedImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext()

Re: UIScrollView to UIImage

2013-07-21 Thread Cody Garvin
ile if you weren't), so I think you're good there. B) Make sure your layer / view isn't nil. Are you using an outlet? Make sure your outlet is connected. - Cody Cody Garvin | Developer Servalsoft LLC On Jul 17, 2013, at 6:56 PM, Trygve Inda wrote: > I am trying to take a "

Re: UIScrollView to UIImage

2013-07-19 Thread Cody Garvin
You're right Kyle. I quickly tried it, saw it worked and moved on. I'll try it again another way and report back Please excuse mobile typos On Jul 18, 2013, at 1:37 PM, Kyle Sluder wrote: > On Thu, Jul 18, 2013, at 01:18 PM, Cody Garvin wrote: >> The UIScrollView add

Re: UIScrollView to UIImage

2013-07-18 Thread Kyle Sluder
On Thu, Jul 18, 2013, at 01:18 PM, Cody Garvin wrote: > The UIScrollView adds these subviews to what's called a contentView. This > is why you have to change a content size to adjust your scrolling, vs > changing the frame of the UIScrollView. You're grabbing the wrong layer.

Re: UIScrollView to UIImage

2013-07-18 Thread Cody Garvin
Hi Trygve, The UIScrollView adds these subviews to what's called a contentView. This is why you have to change a content size to adjust your scrolling, vs changing the frame of the UIScrollView. You're grabbing the wrong layer. You can grab the correct view / layer: [[scrollView c

Re: UIScrollView to UIImage

2013-07-17 Thread Trygve Inda
> Does it do that even if the scroll view isn't scrolled at all but is at the > very top? > > On 18 Jul, 2013, at 9:56, Trygve Inda wrote: > >> I am trying to take a "snapshot" of my UIScrollView and store it in a >> UIImage: >> >&

Re: UIScrollView to UIImage

2013-07-17 Thread Roland King
Does it do that even if the scroll view isn't scrolled at all but is at the very top? On 18 Jul, 2013, at 9:56, Trygve Inda wrote: > I am trying to take a "snapshot" of my UIScrollView and store it in a > UIImage: > > UIGraphicsBeginImageContext(scrollView.bounds

UIScrollView to UIImage

2013-07-17 Thread Trygve Inda
I am trying to take a "snapshot" of my UIScrollView and store it in a UIImage: UIGraphicsBeginImageContext(scrollView.bounds.size); [scrollView.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext

Re: UIScrollView challenge: allow zoom out to see full content

2013-06-20 Thread Rick Mann
Bah, the idea of making the image match the aspect ratio doesn't work because it doesn't support changing ratios (e.g. rotation). On Jun 20, 2013, at 16:11 , Rick Mann wrote: > I have a basic UIScrollView working with pinch zoom and pan under autolayout. > There are still i

UIScrollView challenge: allow zoom out to see full content

2013-06-20 Thread Rick Mann
I have a basic UIScrollView working with pinch zoom and pan under autolayout. There are still issues, including very jumpy zoom, and I still need to find the right way to add some subviews that need to "stick" to the image as it zooms. Another challenge is this: allowing the user t

Keeping UIScrollView content centered

2013-06-14 Thread Rick Mann
As I'm experimenting with how to implement pinch and rotate gestures in a UIScrolLView, I set up a non-autolayout (traditional) pinch-zooming UIScrollView with a UIImageView inside it. I followed the instructions here: http://developer.apple.com/library/ios/#documentation/windows

Re: UIView embedded in UIScrollView hides scroll indicators ?

2013-05-18 Thread David Duncan
ay 18, 2013 at 1:50 PM, Marcelo Alves wrote: > >> >> Did you forgot to set the contentSize for the UIScrollView? >> >> >> On 18/05/2013, at 14:43, Koen van der Drift >> wrote: >> >>> In IB I created an UIView embedded in an UIScrollView. T

Re: UIView embedded in UIScrollView hides scroll indicators ?

2013-05-18 Thread Koen van der Drift
et the contentSize for the UIScrollView? > > > On 18/05/2013, at 14:43, Koen van der Drift > wrote: > > > In IB I created an UIView embedded in an UIScrollView. They both fill up > > the screen and are 320 px wide. Scrolling works just fine, but the > scroll > >

Re: UIView embedded in UIScrollView hides scroll indicators ?

2013-05-18 Thread Marcelo Alves
Did you forgot to set the contentSize for the UIScrollView? On 18/05/2013, at 14:43, Koen van der Drift wrote: > In IB I created an UIView embedded in an UIScrollView. They both fill up > the screen and are 320 px wide. Scrolling works just fine, but the scroll > indicators are inv

UIView embedded in UIScrollView hides scroll indicators ?

2013-05-18 Thread Koen van der Drift
In IB I created an UIView embedded in an UIScrollView. They both fill up the screen and are 320 px wide. Scrolling works just fine, but the scroll indicators are invisible. I triple checked the checkboxes in IB, and both "Scrolling Enabled" and "Shows Vertical Scrollers" are o

UIScrollView - force a bounce

2013-03-16 Thread Alex Kac
I've got a paging UIScrollView with two views/pages on it that scrolls horizontally. We are playing with a few UI ideas and as part of that I'd like to programmatically "bounce" the scroll view. The idea is that as you open the app, we peek into the second page and then b

How to add page in UIScrollView

2013-02-12 Thread Kévin Vavelin
Hi there, I have to do a pdf generator with custom label, so in my storyboard I have a UIScrollView with a UIView inside it, and if my UIView is full, I want to add another UIView and fill it with other label that is not already in. How can I add another page in my UIScrollView with another

Re: UITableView with multiple UIScrollView each having its own zoom scale?

2012-08-08 Thread Laurent Daudelin
Thanks, Quincey! I'll give it a shot! -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/ Logiciels Nemesys Software laur...@nemesys-soft.com On Aug 8, 2012, at 00:56, Quincey Morris w

Re: UITableView with multiple UIScrollView each having its own zoom scale?

2012-08-08 Thread Quincey Morris
On Aug 8, 2012, at 00:27 , Laurent Daudelin wrote: > minimumScale = [self.imageScrollView frame].size.width > / [self.postPictureView frame].size.width; IDK, but this looks like the problem to me. The calculation is using rect widths that are in 2 different coordinate sy

Re: UITableView with multiple UIScrollView each having its own zoom scale?

2012-08-08 Thread Laurent Daudelin
y' means fit in the X-direction, across the cell? > > If I understand properly your custom table view cell has, on the content > view, a UIScrollView, and on that is the image? Is there a reason you can't > pin the UIScrollView to the cells content view so it's resized wh

Re: UITableView with multiple UIScrollView each having its own zoom scale?

2012-08-07 Thread Roland King
ustom table view cell has, on the content view, a UIScrollView, and on that is the image? Is there a reason you can't pin the UIScrollView to the cells content view so it's resized when the cell changes size, and subclass the UIScrollView, using layoutSubviews to set the bounds of the

Re: UITableView with multiple UIScrollView each having its own zoom scale?

2012-08-07 Thread Quincey Morris
On Aug 7, 2012, at 22:10 , Laurent Daudelin wrote: > Here are some screen shots. The first one is when the table view appears. The > second one is almost one screen scrolled down. All the pictures are larger > than the image view displaying them but setting the scrollview zoom scale > properly

Re: UITableView with multiple UIScrollView each having its own zoom scale?

2012-08-07 Thread Alex Zavatone
one containing a different image and potentially each one having a >>> different zoom scale, but I'm seeing weird behavior and I'm starting to >>> think that due to the way UITableViewCells are reused, this might not be >>> possible. >>> >>> I

Re: UITableView with multiple UIScrollView each having its own zoom scale?

2012-08-07 Thread Laurent Daudelin
om scale so that the picture in each cell >> will fit completely, scaling down the zoom of the UIScrollView embedding the >> UIImageView. >> >> However, when I start scrolling up and down, at some point, some images, >> which initially appeared fine, all of

Re: UITableView with multiple UIScrollView each having its own zoom scale?

2012-08-07 Thread Alex Zavatone
om scale so that the picture in each cell will > fit completely, scaling down the zoom of the UIScrollView embedding the > UIImageView. > > However, when I start scrolling up and down, at some point, some images, > which initially appeared fine, all of a sudde

UITableView with multiple UIScrollView each having its own zoom scale?

2012-08-07 Thread Laurent Daudelin
not be possible. I have an array of NSDictionary that have one object containing the data of a UIImage. I initially set the zoom scale so that the picture in each cell will fit completely, scaling down the zoom of the UIScrollView embedding the UIImageView. However, when I start scrolling up an

Re: UIScrollView insertSubview:atIndex: problem

2012-07-31 Thread Quincey Morris
On Jul 31, 2012, at 03:52 , Dave wrote: > Basically I have process that generates UIImage's and each of these images > needs to be presented in a Scroll View. However there can be a large number > of images generated and each image is pretty big too, so obviously, it can't > hold them all in R

Re: UIScrollView insertSubview:atIndex: problem

2012-07-31 Thread David Duncan
On Jul 31, 2012, at 3:52 AM, Dave wrote: > The above is basically what I'd like to do, hold a number of pages/images > "around" the current page and when the user Scrolls left or right replace the > appropriate pages/images with newly rendered versions. So it sounds like you want the views to

Re: UIScrollView insertSubview:atIndex: problem

2012-07-31 Thread Dave
On 30 Jul 2012, at 19:40, David Duncan wrote: You are going to have to define what you mean by start & end, as it is not clear in context. If you mean a visual location, then neither of these methods are going to do what you want. You would put something visually at the start/end of the

Re: UIScrollView insertSubview:atIndex: problem

2012-07-30 Thread David Duncan
On Jul 30, 2012, at 11:20 AM, Dave wrote: > I'm trying to add an a View at the start of a Scroll View but it always seem > to add to the end, not the start. The code I have is: > > [theScroll insertSubview:myImageView atIndex:0]; > > In order to have the image added at the start of the Scroll

UIScrollView insertSubview:atIndex: problem

2012-07-30 Thread Dave
Hi All, I'm trying to add an a View at the start of a Scroll View but it always seem to add to the end, not the start. The code I have is: [theScroll insertSubview:myImageView atIndex:0]; In order to have the image added at the start of the Scroll View, but it acts exactly the same as if I

Re: Is it 'normal' that scrolling in a UIScrollView leaks some bytes?

2012-07-24 Thread Richard Altenburg (Brainchild)
volgende geschreven: > I believe this is a known bug in UIScrollview (search for "strdup leak in > UIScrollview"). Wouldn't hurt to file a bug with Apple (which will probably > be marked a duplicate). ___ Cocoa-dev mailing list (Co

Re: Is it 'normal' that scrolling in a UIScrollView leaks some bytes?

2012-07-24 Thread Richard Altenburg (Brainchild)
ons 48 Bytes 100.0% 1 -[UIScrollView handlePan:] 48 Bytes 100.0% 1 -[UIScrollView _endPanWithEvent:] 48 Bytes 100.0% 1 -[UIScrollView(Static) _startTimer:] 48 Bytes 10

Re: Is it 'normal' that scrolling in a UIScrollView leaks some bytes?

2012-07-24 Thread Eeyore
I believe this is a known bug in UIScrollview (search for "strdup leak in UIScrollview"). Wouldn't hurt to file a bug with Apple (which will probably be marked a duplicate). Aaron On Jul 24, 2012, at 10:28 AM, Richard Altenburg (Brainchild) wrote: > I can answer it myself:

Is it 'normal' that scrolling in a UIScrollView leaks some bytes?

2012-07-24 Thread Richard Altenburg (Brainchild)
, which al works perfectly. Sometimes, just sometimes, when I scroll an image beyond its content size (you can see the animating bouncing back and forth of the image inside the UIScrollView), Instruments reports a memory leak of only small number of bytes. These are not leaked images I created

Re: Debugging uiscrollview not responding to user

2012-05-23 Thread Rick Mann
On May 23, 2012, at 15:51 , Conrad Shultz wrote: > On 5/23/12 3:24 PM, Rick Mann wrote: >> I've got a UIScrollView that's supposed to page horizontally. It >> works correctly if programmatically scrolled, but user touches to >> scroll it are getting eaten by some

Re: Debugging uiscrollview not responding to user

2012-05-23 Thread Conrad Shultz
On 5/23/12 3:24 PM, Rick Mann wrote: > I've got a UIScrollView that's supposed to page horizontally. It > works correctly if programmatically scrolled, but user touches to > scroll it are getting eaten by something else. > > Is there any way to debug the touches, a

Debugging uiscrollview not responding to user

2012-05-23 Thread Rick Mann
I've got a UIScrollView that's supposed to page horizontally. It works correctly if programmatically scrolled, but user touches to scroll it are getting eaten by something else. Is there any way to debug the touches, and see who's getting them? This used to work, but I've b

Re: Problem with setNeedsLayout and layoutSubviews in UIScrollView

2011-06-28 Thread Tales Pinheiro de Andrade
Em 27/06/2011, às 13:56, David Duncan escreveu: > > The problem is that a UIDeviceOrientaiton also includes Unknown, FaceUp and > FaceDown orientations. Thus !Landscape means Portrait or one of those (ditto > for !Portrait). A large portion of the time, your likely holding the device > in Face

Re: Problem with setNeedsLayout and layoutSubviews in UIScrollView

2011-06-27 Thread David Duncan
On Jun 26, 2011, at 12:51 PM, Tales Pinheiro de Andrade wrote: > Well, I used the macro UIDeviceOrientationIsLandscape, I'm assuming that this > is for both sides: > #define UIDeviceOrientationIsPortrait(orientation) ((orientation) == > UIDeviceOrientationPortrait || (orientation) == > UIDevic

Re: Problem with setNeedsLayout and layoutSubviews in UIScrollView

2011-06-26 Thread Tales Pinheiro de Andrade
ot base your layout on the views > bounds instead? > > -- > David Duncan @ My iPhone > > On Jun 26, 2011, at 11:39 AM, Tales Pinheiro de Andrade wrote: > >> Hi. >> >> I have a few custom views of three kind inside a custom UIScrollview. I'm >&

Re: Problem with setNeedsLayout and layoutSubviews in UIScrollView

2011-06-26 Thread David Duncan
ew custom views of three kind inside a custom UIScrollview. I'm > trying to resize these custom views as the device change the orientation. > > I added these custom views programatically to the custom UIScrollView. I > implemented in the custom UIScrollview the below method &

Problem with setNeedsLayout and layoutSubviews in UIScrollView

2011-06-26 Thread Tales Pinheiro de Andrade
Hi. I have a few custom views of three kind inside a custom UIScrollview. I'm trying to resize these custom views as the device change the orientation. I added these custom views programatically to the custom UIScrollView. I implemented in the custom UIScrollview the below method -

UIScrollView zooming a rotated view

2011-06-23 Thread Brian Bruinewoud
Hi All, I have a UIScrollView that contains a single UIView. I have a couple of buttons in the toolbar that let me rotate the UIView in 90 degree increments. When the rotation is 0, zooming via the pinch mechanism works fine. When the rotation is 90 or 270, zooming via pinch does nothing. When

Re: Loop between observers with KVO from UIScrollView

2011-06-21 Thread Quincey Morris
On Jun 21, 2011, at 07:16, talesp wrote: > 1.: should I just check if the object is different from self? Or some more > "complicated"? And what should I check as keyPath? In general, different classes can use the same property names, and keyPath refers to a property name. So, you need to be cer

Re: Loop between observers with KVO from UIScrollView

2011-06-21 Thread talesp
I'm pretty new with KVO. I'm just read the KVO quick star guide and KVO programming guide. Em 20/06/2011, às 02:58, Quincey Morris escreveu: On Jun 19, 2011, at 11:59, Tales Pinheiro de Andrade wrote:   if ([keyPath isEqualToString:@"contentOffset"]) {   CGPoint newCont

Re: Loop between observers with KVO from UIScrollView

2011-06-19 Thread Quincey Morris
On Jun 19, 2011, at 11:59, Tales Pinheiro de Andrade wrote: >if ([keyPath isEqualToString:@"contentOffset"]) { >CGPoint newContentOffset = [(UIScrollView *)object contentOffset]; >newContentOffset.y = self.contentOffset.y; >self.contentOff

Loop between observers with KVO from UIScrollView

2011-06-19 Thread Tales Pinheiro de Andrade
Object:(id)object change:(NSDictionary*)change context:(void *)context { if ([keyPath isEqualToString:@"contentOffset"]) { CGPoint newContentOffset = [(UIScrollView *)object contentOffset]; newContentOffset.y = self.contentOffset.y; self.contentOffset = newC

UITextView making containing UIScrollView scroll

2011-03-12 Thread Roland King
My main view is a UIScrollView on which I have a hierarchy of other views, ending with some UITextViews. I found that when I change the properties of the UITextView, the UIScrollView scrolls itself all over the place, often ending up in a very odd location. Having spent 3 days tearing bits of

Re: why does UIScrollView call layoutSubviews every time it scrolls?

2011-02-08 Thread Bryce Redd
The scroll bar indicator is sent to the front each time the scroll view motion stops and starts, this would require a new layout. On Tue, Feb 8, 2011 at 10:15 AM, David Duncan wrote: > On Feb 8, 2011, at 8:15 AM, Roland King wrote: > > > I can't see why UIScrollView would ca

Re: why does UIScrollView call layoutSubviews every time it scrolls?

2011-02-08 Thread David Duncan
On Feb 8, 2011, at 8:15 AM, Roland King wrote: > I can't see why UIScrollView would call layoutSubviews every time it scrolls, > I expected that it would call layoutSubviews once only when its geometry > changes (or you ask it to) and after that would just scroll its contained

why does UIScrollView call layoutSubviews every time it scrolls?

2011-02-08 Thread Roland King
Motivation: I have a view to display which is normally larger than the area it has to fit in (like UITextView which extends a UIScrollView) so my custom UIView is a UIScrollView subclass, the idea is that when setFrame: gets called, I will eventually get a layoutSubviews which calculates the

UITextField in UIScrollView

2010-12-14 Thread Phillip Mills
I have a number of UITextField objects inside a (subclass of) UIView, which is the content view for a (subclass of) UIScrollView. When the user types into a text field, I dynamically change its size if necessary and reset the content size of the content view. When needed, I also scroll so

Re: bouncing an NSScrollView like UIScrollView

2010-11-06 Thread Laurent Daudelin
On Nov 6, 2010, at 17:58, Alexander Cohen wrote: > On Nov 6, 2010, at 7:02 PM, Kyle Sluder wrote: > >> On Nov 6, 2010, at 3:41 PM, Alexander Cohen wrote: >> >>> Has anyone tried getting the NSScrollView to bounce around when it hits the >>> content edges

Re: bouncing an NSScrollView like UIScrollView

2010-11-06 Thread Alexander Cohen
On Nov 6, 2010, at 7:02 PM, Kyle Sluder wrote: > On Nov 6, 2010, at 3:41 PM, Alexander Cohen wrote: > >> Has anyone tried getting the NSScrollView to bounce around when it hits the >> content edges just like the UIScrollView does? Is there any open source code >> out

Re: bouncing an NSScrollView like UIScrollView

2010-11-06 Thread Kyle Sluder
On Nov 6, 2010, at 3:41 PM, Alexander Cohen wrote: > Has anyone tried getting the NSScrollView to bounce around when it hits the > content edges just like the UIScrollView does? Is there any open source code > out there that might do this or at least point me in the right direction?

bouncing an NSScrollView like UIScrollView

2010-11-06 Thread Alexander Cohen
Has anyone tried getting the NSScrollView to bounce around when it hits the content edges just like the UIScrollView does? Is there any open source code out there that might do this or at least point me in the right direction? thx AC___ Cocoa-dev

iPad - UIScrollView - smooth scrolling

2010-09-03 Thread Robert Vojta
Hi all, I'm trying to optimize our application for smooth scrolling, but it looks like I'm at the end and I don't know what else I can try. Simple description of what I did so far ... Screen looks like ... - background image, which doesn't scroll and is below UIScroll

Re: Odd question about UIViews in UIScrollView

2010-08-27 Thread Eric E. Dolecki
://blog.ericd.net On Fri, Aug 27, 2010 at 9:23 AM, Eric E. Dolecki wrote: > I have a UIScrollView that I am placing custom UIViews into. Album covers > with metadata. Right now just for testing, when I create the UIView to add > to the scroll view, I am also setting an int variable in t

Odd question about UIViews in UIScrollView

2010-08-27 Thread Eric E. Dolecki
I have a UIScrollView that I am placing custom UIViews into. Album covers with metadata. Right now just for testing, when I create the UIView to add to the scroll view, I am also setting an int variable in the UIView... AlbumCover *lad = [[AlbumCover alloc] initWithFrame:CGRectMake(190, 5, 200

Re: Accessing items in a UIScrollView?

2010-07-30 Thread Eric E. Dolecki
;NSLog(@"%d",tag); > > } > > > > > > *** Terminating app due to uncaught exception > 'NSInvalidArgumentException', > > reason: '-[UIScrollView setState:]: unrecognized selector sent to > instance > > 0x593e820' > > > > > > How can I

Re: Accessing items in a UIScrollView?

2010-07-30 Thread Fritz Anderson
[tmp setState:NO]; //Barf here >} >} >NSLog(@"%d",tag); > } > > > *** Terminating app due to uncaught exception 'NSInvalidArgumentException', > reason: '-[UIScrollView setState:]: unrecognized selector sent to instance > 0x593e820

Accessing items in a UIScrollView?

2010-07-30 Thread Eric E. Dolecki
I am trying to quickly prototype something - I am stuffing a bunch of subclassed UIButton controls into a UIScrollView. I would like to access those items later from another method, but I don't know how to properly access them without resorting to an NSArray approach. I have this (setState

Re: Nested UIScrollView: horizontal scrolling

2010-07-25 Thread Pierre de La Morinerie
> before the containing scroll view finishes scrolling? No, zooming can wait for the move to be finished — but I'd like a swipe to start scrolling the inner ScrollView even if the outer ScrollView is still decelerating. >> Additional questions: How does the magic of nested UIScro

Re: Nested UIScrollView: horizontal scrolling

2010-07-24 Thread Scott Anguish
On Jul 23, 2010, at 5:47 AM, Pierre de La Morinerie wrote: > I'm trying to scroll horizontally through a set of pages, where pages are > grouped by two (and can be zoomed both together). So far, my view hierarchy > is: > > • One outter UIScrollView that

Nested UIScrollView: horizontal scrolling

2010-07-23 Thread Pierre de La Morinerie
Hello, I'm trying to scroll horizontally through a set of pages, where pages are grouped by two (and can be zoomed both together). So far, my view hierarchy is: • One outter UIScrollView that scrolls horizontally. • Several inner UIScrollView that contains two pages

Re: Subclass UIScrollView or compose?

2010-07-01 Thread Luke the Hiesterman
It just sounds like trying to subclass UIScrollView is overkill for the problem you're trying to solve. What you want is a custom view inside a UIScrollView and be able to provide the whole view hierarchy as an object for consumption. You don't require special scrollview behavior. If

  1   2   >