3lvis / Form

The most flexible and powerful way to build a form on iOS
http://hyper.no
Other
1.64k stars 145 forks source link

View transition bug when keyboard show, only in iOS 11 #592

Open chy89310 opened 6 years ago

chy89310 commented 6 years ago

Hi, I have a problem when i try to run this project in a iOS11 device.

For detail check the gif: jul-19-2018 12-49-44

I happen only in iOS11, on both iphone and ipad.

chy89310 commented 6 years ago

If you want some details, here is my demo code:

# ViewController
- (IBAction)didButtonClick:(id)sender {
    NSArray *JSON = [NSJSONSerialization JSONObjectWithContentsOfFile:@"json.json"];
    FORMViewController *ctrl = [[FORMViewController alloc] initWithJSON:JSON andInitialValues:nil disabled:false];
    [self presentViewController:ctrl animated:true completion:nil];
}

here is the json content

# json.json
 [
  {
  "id":"group-id",
  "title":"Group title",
  "sections":[
              {
              "id":"section-0",
              "fields":[
                        {
                        "id":"first_name",
                        "title":"First name",
                        "type":"name",
                        "size":{
                        "width":30,
                        "height":1
                        }
                        }
                        ]
              }
              ]
  }
  ]
AnthoPakPak commented 6 years ago

I've got this issue too, library is no longer usable with it… πŸ˜₯

chy89310 commented 6 years ago

I've got this issue too, library is no longer usable with it… πŸ˜₯

you can refer to my commit in a fork repo. Which can solve the problem simply.

https://github.com/kevinsumios/Form/commit/c06ada3b5caf652a7d92551ce748df37ee5e3843

AnthoPakPak commented 6 years ago

@chy89310 Thanks, I'll give it a try ! πŸ‘ From what I've see, you've simply removed all keyboard related stuff. Did you add another keyboard management or library (such as IQKeyboardManager) to handle view moving when opening keyboard ?

chy89310 commented 6 years ago

@chy89310 Thanks, I'll give it a try ! πŸ‘ From what I've see, you've simply removed all keyboard related stuff. Did you add another keyboard management or library (such as IQKeyboardManager) to handle view moving when opening keyboard ?

Actually i don't, and that's the same problem i curious about. Since this work around works for me, i don't take much time to learn about how the view move by it self even though i remove the notification observer. Maybe it's a new feature of iOS 11 i guess.

AnthoPakPak commented 6 years ago

@chy89310 Okay, I will look into it tomorrow and give you some feedback πŸ˜‰

3lvis commented 6 years ago

I guess this is iOS 11 and above?