我在浏览网页时遇到问题。此webview加载包含一些输入字段和一些下拉列表的网页。问题是键盘和滚轮没有出现。我看到一个快速的“闪光”,光标确实进入选定的输入字段,但键盘没有出现。
我正在使用xcode 4.3.3
我的Appdelegate.h
#import <UIKit/UIKit.h>
@class ViewController;
@interface AppDelegate : UIResponder <UIApplicationDelegate> {
UIWindow *windowTB;
UIViewController *tabBarVC;
// UIWebView *homeWebView;
}
@property (strong, nonatomic) IBOutlet UIWindow *windowTB;
@property (strong, nonatomic) IBOutlet UIViewController *tabBarVC;
//@property (strong, nonatomic) IBOutlet UIWebView *homeWebView;
@end
Appdelegate.m(相关部分)
#import "AppDelegate.h"
#import "tabBarVC.h"
#import "homeVC.h"
@implementation AppDelegate
@synthesize windowTB;
@synthesize tabBarVC;
//@synthesize homeWebView;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self.windowTB setRootViewController:tabBarVC];
[self.windowTB makeKeyAndVisible];
return YES;
}
homeVC.h
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
@interface homeVC : UIViewController <UIWebViewDelegate>{
IBOutlet UIWebView *homeWebView;
}
@property (nonatomic, retain) UIWebView *homeWebView;
@end
最后回家VC.m
#import "AppDelegate.h"
#import "homeVC.h"
@implementation homeVC
@synthesize homeWebView;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
return self;
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidLoad
{
[super viewDidLoad];
[homeWebView loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:@"http://rolfdeenen.nl/test.html"]]];
}
我一直在寻找一天,但它并没有给我看。任何人都可以帮助我吗?
感谢名单!
答案 0 :(得分:0)
问题可能在您的网页上,因为webview有标准行为,您无法对其进行修改。