MaterialTextField
MaterialTextField copied to clipboard
MaterialTextFIeld using previous modal's MFTextField font styling
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:
Here's the next pushed VC after the modal VC is dismissed:
And here's how it should look (and does look if the VC is pushed without the modal step)
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?