{"action":"opened","issue":{"url":"https://api.github.com/repos/nicklockwood/SwipeView/issues/158","labels_url":"https://api.github.com/repos/nicklockwood/SwipeView/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/nicklockwood/SwipeView/issues/158/comments","events_url":"https://api.github.com/repos/nicklockwood/SwipeView/issues/158/events","html_url":"https://github.com/nicklockwood/SwipeView/issues/158","id":58880356,"number":158,"title":"Horizontal Spacing between the items","user":{"login":"aareeph","id":10115810,"avatar_url":"https://avatars.githubusercontent.com/u/10115810?v=3","gravatar_id":"","url":"https://api.github.com/users/aareeph","html_url":"https://github.com/aareeph","followers_url":"https://api.github.com/users/aareeph/followers","following_url":"https://api.github.com/users/aareeph/following{/other_user}","gists_url":"https://api.github.com/users/aareeph/gists{/gist_id}","starred_url":"https://api.github.com/users/aareeph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aareeph/subscriptions","organizations_url":"https://api.github.com/users/aareeph/orgs","repos_url":"https://api.github.com/users/aareeph/repos","events_url":"https://api.github.com/users/aareeph/events{/privacy}","received_events_url":"https://api.github.com/users/aareeph/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-25T10:24:31Z","updated_at":"2015-02-25T10:24:31Z","closed_at":null,"body":"Hello\r\n\r\nI 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.\r\n\r\nThis is my swipeView method:\r\n\r\n- (UIView *)swipeView:(SwipeView *)swipeView viewForItemAtIndex:(NSInteger)index reusingView:(UIView *)view\r\n{\r\n    view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 264, 148)];\r\n    \r\n    UIImage *image1 = [UIImage imageNamed:[NSString stringWithFormat:@\"photo%d.png\",index]];\r\n    UIImageView *imageView = [[UIImageView alloc] initWithImage:image1];\r\n    [imageView setFrame:CGRectMake(0,0,244,148)];\r\n    [view addSubview:imageView];\r\n    \r\n    return view;\r\n}"}}