scenee / FloatingPanel

A clean and easy-to-use floating panel UI component for iOS
MIT License
5.6k stars 508 forks source link

`NSGenericException` in Xcode Beta 3 #243

Closed roblabs closed 5 years ago

roblabs commented 5 years ago

NSGenericException in Xcode Beta 3

Error while running the Maps sample app. Not a problem with the library, but the sample app is broken

*** Terminating app due to uncaught exception 'NSGenericException', reason: 'Access to UISearchBar's _searchField ivar is prohibited. This is an application bug'

Expected behavior

Actual behavior

UISearchBar.searchTextField is now available. cf.

https://github.com/SCENEE/FloatingPanel/blob/24d81a4153436f5004134f1cbaf0ab75d7d7e3b9/Examples/Maps/Maps/ViewController.swift#L152,L153

        let textField = searchBar.value(forKey: "_searchField") as! UITextField
        textField.font = UIFont(name: textField.font!.fontName, size: 15.0)

Steps to reproduce

Code example that reproduces the issue

Environment

Library version

$ git log

commit 24d81a4153436f5004134f1cbaf0ab75d7d7e3b9 (HEAD -> master, origin/master, origin/HEAD)
Merge: 5d336b9 5723a80
Author: Shin Yamamoto <shin@scenee.com>
Date:   Mon Jul 22 09:41:51 2019 +0900

Installation method

iOS version(s)

Xcode version

scenee commented 5 years ago

Thanks for you report! I will take care of this issue until Xcode 11 GM seed release.

scenee commented 5 years ago

I fixed this on v1.6.5. Thanks!