Skip to content
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

Swift 4 support #358

Closed
jlaws opened this issue Sep 19, 2017 · 19 comments
Closed

Swift 4 support #358

jlaws opened this issue Sep 19, 2017 · 19 comments

Comments

@jlaws
Copy link

jlaws commented Sep 19, 2017

Any plans to update the library to support Swift 4?

@fabioiegri
Copy link

Hello. First of all, thank You for Your job.

........./Pods/SCLAlertView/SCLAlertView/SCLAlertView.swift:160:999: Global function 'UIColorFromRGB' is internal and cannot be referenced from a default argument value
I receive the following error:

Related code:
public init(kDefaultShadowOpacity: CGFloat = 0.7, kCircleTopPosition: CGFloat = -12.0, kCircleBackgroundTopPosition: CGFloat = -15.0, kCircleHeight: CGFloat = 56.0, kCircleIconHeight: CGFloat = 20.0, kTitleTop:CGFloat = 30.0, kTitleHeight:CGFloat = 25.0, kWindowWidth: CGFloat = 240.0, kWindowHeight: CGFloat = 178.0, kTextHeight: CGFloat = 90.0, kTextFieldHeight: CGFloat = 45.0, kTextViewdHeight: CGFloat = 80.0, kButtonHeight: CGFloat = 45.0, kTitleFont: UIFont = UIFont.systemFont(ofSize: 20), kTextFont: UIFont = UIFont.systemFont(ofSize: 14), kButtonFont: UIFont = UIFont.boldSystemFont(ofSize: 14), showCloseButton: Bool = true, showCircularIcon: Bool = true, shouldAutoDismiss: Bool = true, contentViewCornerRadius: CGFloat = 5.0, fieldCornerRadius: CGFloat = 3.0, buttonCornerRadius: CGFloat = 3.0, hideWhenBackgroundViewIsTapped: Bool = false, contentViewColor: UIColor = UIColorFromRGB(0xFFFFFF), contentViewBorderColor: UIColor = UIColorFromRGB(0xCCCCCC), titleColor: UIColor = UIColorFromRGB(0x4D4D4D)) {

and:
........./Pods/SCLAlertView/SCLAlertView/SCLAlertView.swift:549:192: Var 'defaultColorInt' is internal and cannot be referenced from a default argument value

Thank You very much
Have a nice day
Fabio

@ahmedsafadii
Copy link
Contributor

screen shot 2017-09-23 at 2 07 25 am

for now you have to do this ^_^

@vikmeup
Copy link
Owner

vikmeup commented Sep 23, 2017

@jlaws feel free to submit PR, I would be happy to merge

@rayhk6 rayhk6 mentioned this issue Sep 24, 2017
@aleandro-coppola
Copy link

I have a same problem:
Global function 'UIColorFromRGB' is internal and cannot be referenced from a default argument value
end other like:
Argument of '#selector' refers to instance method 'tapped' that is not exposed to Objective-C

@kuzdu
Copy link

kuzdu commented Oct 24, 2017

I'm confused. I checked out the project and with Swift 4 the code is fine .
When you call the pod like this pod 'SCLAlertView', :git => 'https://github.com/vikmeup/SCLAlertView-Swift', :branch => 'master' you will getting a working Swift 4 version.

Only If you call pod 'SCLAlertView' or pod 'SCLAlertView', '0.7.0' it doesn't work. Is there another version to check out?

Can we (or I) help to release a working version without checking out the master branch?

@UtkuDalmaz
Copy link

Can anyone please update this ????

@shaheero
Copy link

shaheero commented Oct 25, 2017

Using pod update didn't download the latest update (which fixes Swift 4 compatibility). Download the files "SCLAlertView.swift" and "SCLExtensions.swift" from the GitHub repo here and replace them in Pods/SCLAlertView

@alijaza
Copy link

alijaza commented Nov 1, 2017

@vikmeup ☝️

@vikmeup
Copy link
Owner

vikmeup commented Nov 1, 2017

Could you guys submit PR, I would be happy to merge!

@DavidLari
Copy link

@vikmeup: The code is already updated to Swift 4. No PR is needed. It's just that you haven't git tagged a new version and pushed to the pod trunk.

Until that is done, we can use the latest code with the following in our pod file:

pod 'SCLAlertView', :git => 'https://github.com/vikmeup/SCLAlertView-Swift.git'

@yzhong52
Copy link

Any timeline for tagging a new version with official support for swift 4?

@avazquezpr
Copy link

@ahmedsafadii Thanks! Really helped.

@nmDejamobile
Copy link

Tagging and updating lib versions would be nice. Still in 0.7.0 but not compatible with swift 3.2 anymore. Still have a project to update to swift4 but it have to build before. So I had to point my podfile directly to 3687d79

@vikmeup
Copy link
Owner

vikmeup commented Nov 30, 2017

I will do tonight! Sorry guys for long delay.

@Ewg777
Copy link

Ewg777 commented Nov 30, 2017

@vikmeup great! Thanks! Better late than never.

@jlaws
Copy link
Author

jlaws commented Dec 12, 2017

@vikmeup how about tonight :)

@jh97uk
Copy link

jh97uk commented Dec 18, 2017

This would be awesome if possible!

@ismaiI1
Copy link

ismaiI1 commented Jan 5, 2018

@vikmeup we are waiting "tonight" :D

@vikmeup
Copy link
Owner

vikmeup commented Mar 4, 2018

Pushed! finally can close this!

@vikmeup vikmeup closed this as completed Mar 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests