Skip to content

MaterialTextFIeld using previous modal's MFTextField font styling #9

Open

Description

@brod-ie

I've run into a bug (or memory management issue?) where an MFTextField is referencing a previously initialised MFTextField's font and text alignment.

The app presents a VC modally, once a verification code is confirmed this is dismissed and a VC is then pushed. This latter VC also contains an MFTextField which should have the font Avenir Next Regular sized 16pt left aligned yet matches the previous field's styling of Avenir Next Regular sized 24pt centre aligned.

Here's the modally presented VC:
screen shot 2016-12-28 at 09 25 12

Here's the next pushed VC after the modal VC is dismissed:
screen shot 2016-12-28 at 09 23 24

And here's how it should look (and does look if the VC is pushed without the modal step)
screen shot 2016-12-28 at 08 54 03

What I've tried:

  • Setting the font/alignment of the MFTextField in the modal VC's nib to size 16pt left aligned which stops the issue (thus confirming it's referencing this field). This of course doesn't fix the issue as I want that MFTextField in 24pt font centred
  • Manually setting the font of the MFTextField in viewDidLoad/appear
  • Checking there's no duplicated or cross referenced IBOutlets between the two nibs
  • Ensuring first responders are resigned correctly
  • Setting outlets to nil

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions