Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 如何在Apportable中支持国际键盘?_Objective C_Apportable - Fatal编程技术网

Objective c 如何在Apportable中支持国际键盘?

Objective c 如何在Apportable中支持国际键盘?,objective-c,apportable,Objective C,Apportable,目前,我正在尝试合适的初学者工具包。而且,UITextField似乎无法与非英语键盘一起正常工作。我想知道如何启用非英语键盘 该设备(三星Galaxy S2)中的Android操作系统(4.x)以韩语模式运行,并且在系统设置应用程序中安装并启用了韩语键盘。键盘在其他应用程序中运行良好。但在Apportable构建的应用程序中,它不起作用。在我把语言模式改为韩语后,它仍然输入英语字符而不是韩语字符组合 下面是我按下ㅎ键g代替ㅎ字符。在英文键盘中,g与ㅎ键是 更新 我进一步调查了这一点,发现了这些

目前,我正在尝试合适的初学者工具包。而且,
UITextField
似乎无法与非英语键盘一起正常工作。我想知道如何启用非英语键盘

该设备(三星Galaxy S2)中的Android操作系统(4.x)以韩语模式运行,并且在系统设置应用程序中安装并启用了韩语键盘。键盘在其他应用程序中运行良好。但在Apportable构建的应用程序中,它不起作用。在我把语言模式改为韩语后,它仍然输入英语字符而不是韩语字符组合

下面是我按下
键<代码>g
代替
字符。在英文键盘中,
g
键是

更新

我进一步调查了这一点,发现了这些要点

  • 一些设备的测试结果

    • 三星Galaxy Gio(出厂默认姜饼):效果良好。没问题
    • 三星Galaxy S Hoppin(出厂默认姜饼):效果良好。没问题
    • 三星Galaxy S2高清LTE(更新为Jelly Bean,4.1.2):不工作。同样的问题
    • 三星Galaxy S2(更新为Jelly Bean 4.1.2):不工作。同样的问题
  • 我无法使用最新的设备进行测试,因为我没有

  • 此问题仅在同一键盘软件的qwerty模式下发生。同一键盘软件的其他输入模式工作正常

  • 安卓市场安装的谷歌qwerty键盘应用程序运行良好

  • 我认为这是一个错误的三星软件只为特定版本

    繁殖 下面是复制此问题的
    AppDelegate.m
    文件的完整源代码。只需创建一个新项目,复制并粘贴。然后你会发现问题所在。您的Android操作系统需要设置为韩语模式,还需要启用韩语键盘。我认为这可以用另一种语言键盘来测试,比如日语或汉语,它需要动态组合



    到目前为止还不能繁殖。我的S2没有韩语键盘,Nexus 7韩语键盘工作正常。好的,谢谢关心。我为更多的设备添加了一些测试结果。现在我认为这是三星安卓4.x版本的一个缺陷。有几个三星韩国键盘软件的解压APK,但它们都来自2.x,所以这对这个问题没有意义。问题是,即使这是一个bug,我也必须处理这个问题,因为三星事实上是Android标准,至少在韩国市场是如此,而且在其他本地化版本的设备上也可能有类似的bug。我不确定Android 4.x附带的最新设备是否仍会出现这种情况。我将尝试退回到带有Java桥接功能的Android本机UI。为什么这个问题会被否决?好问题。对我来说,它满足了一个好的,甚至是伟大的问题的所有标准。它将有助于任何人处理国际化与适当的SDK。
    #import "AAAppDelegate.h"
    
    
    @interface  TesterView : UIView
    @end
    
    
    @implementation AAAppDelegate
    
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        // Override point for customization after application launch.
        self.window.backgroundColor = [UIColor whiteColor];
        [self.window makeKeyAndVisible];
    
    
        UINavigationController* nc  =   [[UINavigationController alloc] init];
    
        UITableViewController*  tvc =   [[UITableViewController alloc] init];
        tvc.navigationItem.title    =   [NSString stringWithCString:"TT한글TT" encoding:NSUTF8StringEncoding];
        tvc.navigationItem.leftBarButtonItem        =   [[UIBarButtonItem alloc] initWithTitle:@"WDWD" style:(UIBarButtonItemStyleDone) target:nil action:nil];
        tvc.navigationItem.rightBarButtonItem   =   [[UIBarButtonItem alloc] initWithTitle:@"@E###@@#" style:(UIBarButtonItemStyleBordered) target:self action:@selector(test1:)];
        [nc pushViewController:tvc animated:NO];
        [self.window setRootViewController:nc];
    
        return YES;
    }
    - (void)test1:(id)sender
    {
            UILabel*    lbl =   [[UILabel alloc] init];
            lbl.text    =   @"DWDWDWD";
            [lbl setFrame:CGRectMake(0, 0, 100, 100)];
            [lbl setTextColor:[UIColor blackColor]];
            [lbl setBackgroundColor:[UIColor grayColor]];
    
            UITextField*    txt =   [[UITextField alloc] init];
            txt.text    =   [NSString stringWithCString:"This is UITextField. I am trying to write some Korean characters (한글)." encoding:NSUTF8StringEncoding];
            [txt setFrame:CGRectMake(50, 50, 200, 100)];
            [txt setTextColor:[UIColor whiteColor]];
            [txt setBackgroundColor:[[UIColor blackColor] colorWithAlphaComponent:0.5f]];
    
            UIScrollView*   sv  =   [[UIScrollView alloc] init];
            [sv setFrame:CGRectMake(0, 100, 320, 100)];
            [sv setBackgroundColor:[[UIColor blueColor] colorWithAlphaComponent:0.5f]];
    
            UITextView*     txtv    =   [[UITextView alloc] init];
            [txtv setFrame:CGRectMake(100, 0, 100, 100)];
            [txtv setBackgroundColor:[[UIColor greenColor] colorWithAlphaComponent:0.5f]];
            [sv addSubview:txtv];       //  BUG: adding subview on UIScrollView doesn't work. Also UIScrollView scrolling doesn't seem to work.
    
            UIViewController*   vc  =   [[UIViewController alloc] init];
            vc.view =   [[TesterView alloc] init];
            [vc.view addSubview:lbl];
            [vc.view addSubview:txt];
            [vc.view addSubview:sv];
            [vc.view setBackgroundColor:[UIColor redColor]];
            [sv setContentSize:CGSizeMake(400, 0)];
    
            UINavigationController* nc  =   (id)self.window.rootViewController;
            [nc pushViewController:vc animated:YES];
    }
    
    @end
    
    
    @implementation TesterView
    //- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
    //{
    //  [super touchesBegan:touches withEvent:event];
    //}
    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
    {
        [super touchesMoved:touches withEvent:event];
        NSLog(@"touches = %@, event = %@", touches, event);
    
        UITouch*    t   =   touches.anyObject;
        CGPoint     p   =   [t locationInView:self];
    
        [self.subviews[0] setFrame:CGRectMake(p.x, p.y, 100, 100)];
    }
    @end