0
當您點擊iPhone上的webform時,這個藍色的「確定」按鈕在UIWebview中很常見。如何在UIWebview表單中創建鍵盤的OK按鈕?
是否有一個簡單的方法來重新創建它的代碼?或者我將不得不以艱難的方式創造它?
最密切的代碼是:
UISegmentedControl *buttonOK = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObject:@"OK"]];
[buttonOK setSegmentedControlStyle:UISegmentedControlStyleBar];
[buttonOK setTintColor:[UIColor colorWithRed:0.25f green:0.51f blue:0.95f alpha:1.0f]];
[buttonOK setFrame:CGRectMake(276, 8, 38, 30)];
但是是不一樣的......
好主意!這是一個UIBarButtonItem :) – Rodrigo 2012-04-12 13:18:07
關於「Anterior」/「Seguinte」(下一個,上一個)按鈕。只是一個UISegmentedControl或是一個UIBarButtonItem?我做了一件與此相同的事情,但不一樣。 – Rodrigo 2012-04-12 14:32:27
這是一個包裹在UIBarButtonItem中的UISegmentedControl。我已更新我的文章中的代碼以包含它。 – Shaun 2012-04-13 20:54:26