Note that there are some explanatory texts on larger screens.

plurals
  1. POprogrammatically adding custom button messing with eachother
    text
    copied!<p>I have a void I'm calling that shows hidden view on a cell when i swipe over, when they were al set to icons the positioning worked great, however changing them to custom buttons so i can have text instead of icons, had messed things up.</p> <p>EDIT: also, if i touch where the buttons SHOULD be, it works as if there really there, it just "Looks" messed up. For example, if in the example where its wrong (image) how the decline1 is on the left, if i click it, it accepts the request, but if i click in the middle empty area, nothing. </p> <p>This is the coding</p> <pre><code>- (void)bottomDrawerWillAppear { UIImageView *drawerBGImg = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,75)]; NSString *friendAvatar = [NSString stringWithFormat:@"%@%@%@", @"http://www.thatonewebsite.com/images/users/", [MyClass friendID], @".jpg"]; [drawerBGImg setImageWithURL:[NSURL URLWithString:friendAvatar]]; self.bottomDrawer.clipsToBounds = YES; drawerBGImg.contentMode = UIViewContentModeScaleAspectFill; [self.bottomDrawer addSubview:drawerBGImg]; UIImageView *drawerBG = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,75)]; drawerBG.image = [UIImage imageNamed:@"drawerBG.png"]; [self.bottomDrawer addSubview:drawerBG]; NSLog(@"%@", [MyClass friendID]); UIButton *inviteToLocationBtn=[UIButton buttonWithType:UIButtonTypeCustom]; inviteToLocationBtn.frame=CGRectMake(15.0, 15.0, 80.0, 50.0); [inviteToLocationBtn setTitle:@"accept" forState:UIControlStateNormal]; inviteToLocationBtn.titleLabel.font = [UIFont fontWithName:@"HelveticaNeue-Light" size: 22.0f]; inviteToLocationBtn.titleLabel.textColor = [UIColor whiteColor]; [inviteToLocationBtn addTarget:self action:@selector(callAccept) forControlEvents:UIControlEventTouchUpInside]; [self.bottomDrawer addSubview:inviteToLocationBtn]; UIButton *deleteBtn=[UIButton buttonWithType:UIButtonTypeCustom]; deleteBtn.frame=CGRectMake(130.0, 15.0, 80.0, 50.0); [inviteToLocationBtn setTitle:@"decline1" forState:UIControlStateNormal]; inviteToLocationBtn.titleLabel.font = [UIFont fontWithName:@"HelveticaNeue-Light" size: 22.0f]; inviteToLocationBtn.titleLabel.textColor = [UIColor whiteColor]; [deleteBtn addTarget:self action:@selector(callDeny) forControlEvents:UIControlEventTouchUpInside]; [self.bottomDrawer addSubview:deleteBtn]; UIButton *messageBtn=[UIButton buttonWithType:UIBarButtonSystemItemCompose]; messageBtn.frame=CGRectMake(245.0, 15.0, 50.0, 50.0); UIImage *messageImage = [UIImage imageNamed:@"messageIcon.png"]; [messageBtn setImage:messageImage forState:UIControlStateNormal]; [messageBtn addTarget:self action:@selector(callChat) forControlEvents:UIControlEventTouchUpInside]; [self.bottomDrawer addSubview:messageBtn]; } </code></pre> <p>before you take a look, i apologize for the large images this is how it looks <img src="https://i.stack.imgur.com/l11HC.png" alt="enter image description here"></p> <p>This is how its supposed to look, The middle image, invitation.</p> <p><img src="https://i.stack.imgur.com/rjrz2.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload