Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing Done button with image on Model View #59

Open
bishalg opened this issue Jun 28, 2013 · 0 comments
Open

Changing Done button with image on Model View #59

bishalg opened this issue Jun 28, 2013 · 0 comments

Comments

@bishalg
Copy link

bishalg commented Jun 28, 2013

I have following code to display the model view of SVWevViewController but I cant see the change on SVView DONE button ? why ?

NSString *linkURL = [[[self allItems] objectAtIndex:[self itemNo]] valueForKey:@"link"];

UIImage *buttonImage = [UIImage imageNamed:@"btn_left"];
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setImage:buttonImage forState:UIControlStateNormal];
button.frame = CGRectMake(0, 0, buttonImage.size.width, buttonImage.size.height);
[button addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *customBarItem = [[UIBarButtonItem alloc] initWithCustomView:button];

SVModalWebViewController *webViewController = [[SVModalWebViewController alloc] initWithAddress:linkURL];
webViewController.navigationItem.leftBarButtonItem = customBarItem;

[self presentModalViewController:webViewController animated:YES];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant