Pagination error scrollview
<p>I ahve a view controller that holds 4 images ,i implement the pagination for these images this is my code</p>

<pre><code>- (void)viewDidLoad {
    [super viewDidLoad];

    [imageViewObj setImage:[UIImage imageNamed:@"hand1@2x"]];

    NSTimer *ImgChangeTimer = [NSTimer scheduledTimerWithTimeInterval:2.0
                                                               target:self
                                                             selector:@selector(changeImage)
                                                             userInfo:nil
                                                              repeats:YES];

pageControlBeingUsed = NO;

    NSArray *colors = [NSArray arrayWithObjects:[UIImage imageNamed:@"help3@2x"], [UIImage imageNamed:@"help4@2x"], [UIImage imageNamed:@"help2@2x"],[UIImage imageNamed:@"help1@2x"] ,nil];
    for (int i = 0; i &lt; colors.count; i++) {
        CGRect frame;
        frame.origin.x = self.scrollView.frame.size.width *i;
        frame.origin.y = 0;
        frame.size = self.scrollView.frame.size;

        UIImageView*subview = [[UIView alloc] initWithFrame:frame];
        UIImage *imggg = [colors objectAtIndex:i];
        [subview setBackgroundColor:[UIColor colorWithPatternImage:imggg]]; 
        [self.scrollView addSubview:subview];
        [self.scrollView addSubview:imageViewObj];
        [subview release];
        }
    self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.size.width * colors.count, self.scrollView.frame.size.height);

    self.pageControl.currentPage = 0;
    self.pageControl.numberOfPages = colors.count;
</code></pre>

<p>my need is i want to put a close button in the last image ,or the close button is hidden for first three-images and will unhidden when the user paging the last image.is there any way to do this?.
Thanks in advance.
EDIT</p>

<pre><code>if (self.pageControl.currentPage == 0) {
        UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"df" message:@"okkkk" delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil, nil];
        [alert show];
        [alert release];
    }
</code></pre>

<p>i put this in viewdidlod and i get the alertview</p>

<p>but when i put "4" instead of "0" i didnt get the alertview</p>
