@@ -54,17 +54,29 @@ - (void)webViewDidFinishLoad:(UIWebView *)webView {
54
54
}
55
55
56
56
- (void )renderButtons : (UIWebView*)webView {
57
+ UIFont* font = [UIFont fontWithName: @" HelveticaNeue" size: 12.0 ];
58
+
57
59
UIButton *messageButton = [UIButton buttonWithType: UIButtonTypeRoundedRect];
58
60
[messageButton setTitle: @" Send message" forState: UIControlStateNormal];
59
61
[messageButton addTarget: self action: @selector (sendMessage: ) forControlEvents: UIControlEventTouchUpInside];
60
62
[self .view insertSubview: messageButton aboveSubview: webView];
61
- messageButton.frame = CGRectMake (20 , 414 , 130 , 45 );
62
-
63
+ messageButton.frame = CGRectMake (10 , 414 , 100 , 35 );
64
+ messageButton.titleLabel .font = font;
65
+ messageButton.backgroundColor = [UIColor colorWithWhite: 1 alpha: 0.75 ];
66
+
63
67
UIButton *callbackButton = [UIButton buttonWithType: UIButtonTypeRoundedRect];
64
68
[callbackButton setTitle: @" Call handler" forState: UIControlStateNormal];
65
69
[callbackButton addTarget: self action: @selector (callHandler: ) forControlEvents: UIControlEventTouchUpInside];
66
70
[self .view insertSubview: callbackButton aboveSubview: webView];
67
- callbackButton.frame = CGRectMake (170 , 414 , 130 , 45 );
71
+ callbackButton.frame = CGRectMake (110 , 414 , 100 , 35 );
72
+ callbackButton.titleLabel .font = font;
73
+
74
+ UIButton* reloadButton = [UIButton buttonWithType: UIButtonTypeRoundedRect];
75
+ [reloadButton setTitle: @" Reload webview" forState: UIControlStateNormal];
76
+ [reloadButton addTarget: webView action: @selector (reload ) forControlEvents: UIControlEventTouchUpInside];
77
+ [self .view insertSubview: reloadButton aboveSubview: webView];
78
+ reloadButton.frame = CGRectMake (210 , 414 , 100 , 35 );
79
+ reloadButton.titleLabel .font = font;
68
80
}
69
81
70
82
- (void )sendMessage : (id )sender {
0 commit comments