-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PMAlertController textfield access via objc #86
Comments
Hi there. Sorry for the delay. |
Hi, that’s no problem :-) During the testing, i’ve seen a second (small) problem in relation with ObjC Projects: pod update
Update all pods
…
Pre-downloading: `PMAlertController` from `https://github.com/pmusolino/PMAlertController.git`, branch `master`
…
Installing PMAlertController 4.0.0
…
[!] Unable to determine Swift version for the following pods:
- `PMAlertController` does not specify a Swift version and none of the targets (`XYZ`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod. A workaround for me was to let the Podfile set the swift-version „by hand“: pre_install do |installer|
installer.analysis_result.specifications.each do |s|
if s.name == 'PMAlertController'
s.swift_version = '5.0'
end
end
end |
I’ll check |
Hi, if nearly forgotten this issue - bit now I had some time to look into your swift-code. The main problem with adding/accessing the textFields from objc code were triggered by two things:
[quittungDatenAlert addTextFieldWithTextField:nil :^(UITextField *textField) {
[textField setPlaceholder: @"Dummy-Placeholder"];
[textField setKeyboardType:UIKeyboardTypeDefault];
}];
With this patch, you should be able to use PMAlertController in objective-c projects as in older versions (without major changes in existing codes). |
Hi,
i’m using PMAlertController (installed via pod) within a objc app. After some issues with with pods, i’ve removed my pods-folder and reinstalled every pod.
After re-installing i’ve got some build-errors in connection with textFields inside the alert controller.
My (relevant) code:
Instead of accessing the textfield, Xcode now created the following build error:
No visible @interface for 'PMAlertController' declares the selector ‚textFields'
How else could you access the text fields or where is the error?
The text was updated successfully, but these errors were encountered: