Horizontal Spacing between the items
aareeph opened this issue · 0 comments
Hello
I am trying to add horizontal spacing between the items. Someone suggested in this forum to make the UIView slightly larger than the image but doing so is affecting the horizontal alignment of current image. If the image size is smaller than the size of UIView it starts appearing towards the left instead of center of the screen.
This is my swipeView method:
-
(UIView *)swipeView:(SwipeView *)swipeView viewForItemAtIndex:(NSInteger)index reusingView:(UIView *)view
{
view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 264, 148)];UIImage *image1 = [UIImage imageNamed:[NSString stringWithFormat:@"photo%d.png",index]];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image1];
[imageView setFrame:CGRectMake(0,0,244,148)];
[view addSubview:imageView];return view;
}