App Store screenshot auto scroll effect - ios

In the Appstore screen shots section, just wondering how would someone implement the way Apple automatically scrolls down right at the screen shot edges when a user starts paging the screenshots horizontally?
Did they use animation? How would you do it?
Thanks!

They probably use the UIScrollView method:
- (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated
or the UIScrollView method:
- (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated
When the horizontal scroll view's delegate method
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
gets called, figure out the rect or point you want, and then do:
[theVerticalScrollView scrollRectToVisible:theRectYouWant animated:YES];
or
[theVerticalScrollView setContentOffset:thePointYouWant animated:YES];

Related

When UITextView is scrolling ...?

I have a textView which is not editable so my textView is only readable. And there is a ImageView on the top of textView. I want that, when the textView is scrolling, ImageView (Y position) disappear slowly depends on How many the textView scrolled.. If I should give an example, it looks like Twitter "Me" page but non blurred. I hope I was clear.
First of call UIScrollViewDelegate, make your viewcontroller delegate to self.Because it's subclass of UIScrollview.
and implement scrollView function according to your need.Suppose you want to disappear image after scrolling finished. then implement this method.
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
NSLog(#"Finished scrolling");
}

How to make DPFBannerView in UITableview did not scroll

i am new in Google admob development. In this case i need to add an admob inside my uitableview, I make an implementation like this on :
the problem is, the cell that contain the ads (I Use DFPBannerView) is scrollable, i want to make it unscrollable. I just want to make the uitableview scrollable but the banner view is not. I already implement some suggestion from UIScrollView doesn't scroll when touching GADBannerView subview
but it still can not make the ads unscrollable. is there anyone can help me?
There are basic 2 solutions to this:
Add the view to the superview of your table view instead of to the table view itself. Then you just set the frame of the tableview to be shorter so that it is not cut off by the banner. This is provided you are not using a UITableViewController because if you're using one of those, the table view is the root view.
Add the subview to your tableview directly, and implement scrollViewDidScroll: and change its frame based on that. The implementation would look something like this:
- (void) scrollViewDidScroll:(UIScrollView *)scrollView
{
CGRect bannerFrame = myBanner.frame;
bannerFrame.origin.y = CGRectGetMaxY(scrollView.bounds) - bannerFrame.size.height;
myBanner.frame = bannerFrame;
}

not able to Implement Scrollview(scrolling and zooming) for Gallery View

Am using scrollView to implement Gallery like View. But i am stuck. I have dynamic, say 10 pics to be shown in the horizontal scroller, once at a time. am using following code
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
UIImageView *img1=[array_for_ImageView objectAtIndex:currentImageView];
return img1;
}
problem is, it works fine for the first ImageView. But creates a huge rendering problem when trying to zoom the image at 2, 3 etc vertex. I want to implement scrolling and zooming both.
I also used
- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(CGFloat)scale
to check when the zooming end so that I can reset UIscrollView size again.
Please guide me.

How can i hide/show images while scrolling in UITableView?

I'm new to iOS programming and i want to learn something about UITableView.
I have some images in UITableViewCell. I want to hide my images when scrolling start then i want to show them when scrolling stop.
How can i do that ?
Is there a method or something else about that ?
UITableView inherits from UIScrollView, thus you can in your tableView delegate receive
UIScrollViewDelegate callbacks.
Implement the delegate method
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
which tells the delegate when the scroll view is about to start scrolling the content.
and
- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
which tells the delegate when the user finishes scrolling the content.
Read the ScrollViewDelegate Reference.
It is not a big deal you simply need to implement scrollview delegated methodes to know when scrolling stops ,Then set a bool value and reload the table and on basis of bool value you can show and hide the images.When scrolling starts set bool to NO.

Table view scrolling event

Is there any event in table view which will get triggered when i try to scroll the table view.
I want to create a down arrow image to the bottom of the table view ,when the user tries to scroll through the table view.Any help will be appreciated.
Thanks,
Christy
As far as i recall, since UITableView Inherits from UIScroll view you can listen to the UIScrollViewDelegate methods:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
}
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView
willDecelerate:(BOOL)decelerate
{
}
Any way. make sure that
tableView.delegate=self;

Resources