Re: UITableView with multiple UIScrollView each having its own zoom scale?
Re: UITableView with multiple UIScrollView each having its own zoom scale?
- Subject: Re: UITableView with multiple UIScrollView each having its own zoom scale?
- From: Alex Zavatone <email@hidden>
- Date: Wed, 08 Aug 2012 01:30:19 -0400
In my ignorance, I would suspect that there might be two factors at play. One being gesture tracking applied to which object/view, the other being initialization of the image scale in the view of the subview when the scene is being drawn.
Out of curiosity, how does the image scale behave when you set a minimum zoom size?
What I have seen is that there are many unseen inherited operations and we don't see what gets called when as items appear. For instance, I could not set the frame of a storyboarded 1/2 screen TVC on viewDidLoad, or viewWillAppear but setting it on viewDidAppear work just fine without any visual artifacts that I would have expected.
My suspicion would be that you need to identify the event chain when the view appears and for giggles, see if you can manually set the scale of the zoom at different events and record where it fails and where it works. Once you find where it works, track down the reason why and work within the initialization routines.
FYI, this is one of my gripes with OC. There is no way to see the parent method invocation chain in the source. It would rock if you had an option to see this at a 50% transparency so that you could see the inherited methods that are called which set up your display and you have little knowledge about.
GL. Hope this helps.
On Aug 8, 2012, at 1:10 AM, Laurent Daudelin wrote:
> Sure,
>
> 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, each image fits in the scrollview. The 3rd screen shot is showing the first cell almost at the top, the one originally with the sunset. As you can see, the image is zoomed all the way in even though there was no double tap on the image.
>
> 1:
> http://www.nemesys-soft.com/images/screenshot1.png
>
> 2:
> http://www.nemesys-soft.com/images/screenshot2.png
>
> 3:
> http://www.nemesys-soft.com/images/screenshot3.png
>
>
> Not too sure what is happening. I have an NSLog() statement that prints the zoom scale of the scrollview when the table asks for the cell at a given index path and the zoom scale is the same all the time, but, obviously, it is not.
>
> -Laurent.
> --
> Laurent Daudelin
> AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/
> Logiciels Nemesys Software email@hidden
>
> On Aug 7, 2012, at 19:25, Alex Zavatone <email@hidden> wrote:
>
>> Got a screenshot? I'm having a hard time visualizing what you're doing.
>>
>> On Aug 7, 2012, at 6:58 PM, Laurent Daudelin wrote:
>>
>>> I've been trying to get my UITableView with custom UITableViewCells, each 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 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 and down, at some point, some images, which initially appeared fine, all of a sudden appear all the way zoomed in. I check the zoom factor in tableView:cellForRowAtIndexPath: when I configure the cell that the UITableView is requesting and maybe I'm missing something, but in each case, the zoom scale factor seems to be the same. However, on screen, the image is clearly zoomed quite a bit. I started off from the TapToZoom project part of the ZoomSuite sample.
>>>
>>> Anybody knows if this would be possible or not? I'd hate wasting my time beating a dead horse if, due to the nature of UITableView re-using UITableViewCell, this would not be possible.
>>>
>>> Any comment appreciated.
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden