Sclalertview-swift: μŠ€μœ„ν”„νŠΈ 4

에 λ§Œλ“  2017λ…„ 09μ›” 24일  Β·  29μ½”λ©˜νŠΈ  Β·  좜처: vikmeup/SCLAlertView-Swift

λ‚΄ ν”„λ‘œμ νŠΈμ— #351 링크λ₯Ό μ‚¬μš©ν–ˆμŠ΅λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ 지속 μ‹œκ°„ κΈ°λŠ₯은 더 이상 μž‘λ™ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μΉœμ ˆν•˜κ²Œ μˆ˜μ •μ„ λ„μ™€μ£Όμ„Έμš”. 감사 ν•΄μš”.

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

        let alert = SCLAlertView(appearance: appearance)
        let showTimeout = SCLButton.ShowTimeoutConfiguration(prefix: "(", suffix: " " + "second".localize() + ")")
        _ = alert.addButton("cancel_order".localize(), backgroundColor: UIColor(hex:"FFBA00"), textColor: UIColor.white, showTimeout: showTimeout) {

}

 let timeoutValue: TimeInterval = 5.0
        let timeoutAction: SCLAlertView.SCLTimeoutConfiguration.ActionType = {


        }

        alert.showWait("", subTitle: "order_message_to_drivers".localize(), timeout: SCLAlertView.SCLTimeoutConfiguration(timeoutValue: timeoutValue, timeoutAction: timeoutAction), colorStyle: 0xFFBA00, colorTextButton: 0xFFFFFF)

λͺ¨λ“  29 λŒ“κΈ€

μ§€κΈˆμ€ 였λ₯˜λ₯Ό ν΄λ¦­ν•˜μ‹­μ‹œμ˜€. μƒˆ μ½”λ“œμ˜ λͺ¨μ–‘이 μžλ™μœΌλ‘œ ν‘œμ‹œλ˜μ–΄μ•Ό ν•©λ‹ˆλ‹€. 그런 λ‹€μŒ 앱을 λ‹€μ‹œ μ‹€ν–‰ν•˜μ‹­μ‹œμ˜€.

μ§€κΈˆμ€ 기간을 μ§€μ›ν•˜μ§€ μ•ŠμŠ΅λ‹ˆκΉŒ?
alertView.showError("Title", subTitle:"abc", duration: 3)
이것은 보여쀀닀
ν˜ΈμΆœμ— 잘λͺ»λœ 인수 λ ˆμ΄λΈ”μ΄ μžˆμŠ΅λ‹ˆλ‹€('_:subTitle:duration:'κ°€ 있고 '_:subTitle:closeButtonTitle:'이 ν•„μš”ν•¨). 'duration'을 'closeButtonTitle'둜 λ°”κΏ‰λ‹ˆλ‹€.

흠, λ‚˜λŠ” μ§€κΈˆ λ‚΄ λ§₯뢁을 가지고 μžˆμ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 이번 주말에 μ‚΄νŽ΄λ³΄κ² μŠ΅λ‹ˆλ‹€. λ‹€λ₯Έ μ‚¬λžŒμ΄ 더 빨리 ν•  수 β€‹β€‹μžˆκΈ°λ₯Ό λ°”λžλ‹ˆλ‹€.

μ—…λ°μ΄νŠΈν•˜μ‹­μ‹œμ˜€. 항상 이 λ„μ„œκ΄€μ„ μ‚¬λž‘ν–ˆμŠ΅λ‹ˆλ‹€. Swift4 μ—…λ°μ΄νŠΈλ₯Ό κΈ°λŒ€ν•©λ‹ˆλ‹€

Swift 4용 라이브러리λ₯Ό μ—…λ°μ΄νŠΈν•©λ‹ˆλ‹€.

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

@ahmedsafadii μ—κ²Œ κ°μ‚¬ν•˜μ§€λ§Œ 지속 μ‹œκ°„ λ¬Έμ œλŠ” μˆ˜μ •ν•˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€.

@rayhk6 무슨 λ¬Έμ œμΈμ§€

두 νŒŒμΌμ„ λͺ¨λ‘ μ΄κ²ƒμœΌλ‘œ λ°”κΎΈμ‹­μ‹œμ˜€. :)

@ahmedsafadii λ‚˜λŠ” μ—¬μ „νžˆ λ™μΌν•œ λ¬Έμ œμ— μ§λ©΄ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€!

@Piyush08 μ½”λ“œλ₯Ό κ³΅μœ ν•˜κ±°λ‚˜ 문제λ₯Ό

@Piyush08 지속 μ‹œκ°„μ„ μ‹œκ°„ 초과둜 λ°”κΎΈμ‹­μ‹œμ˜€. 그것은 λ‚˜λ₯Ό μœ„ν•΄ μž‘λ™ν•©λ‹ˆλ‹€.
μ°Έμ‘°: https://github.com/vikmeup/SCLAlertView-Swift/blob/master/Example/SCLAlertViewExample/ViewController.swift

        let alert = SCLAlertView(appearance: appearance)
        let showTimeout = SCLButton.ShowTimeoutConfiguration(prefix: "(", suffix: " " + "second".localize() + ")")
        _ = alert.addButton("cancel_order".localize(), backgroundColor: UIColor(hex:"FFBA00"), textColor: UIColor.white, showTimeout: showTimeout) {

}

 let timeoutValue: TimeInterval = 5.0
        let timeoutAction: SCLAlertView.SCLTimeoutConfiguration.ActionType = {


        }

        alert.showWait("", subTitle: "order_message_to_drivers".localize(), timeout: SCLAlertView.SCLTimeoutConfiguration(timeoutValue: timeoutValue, timeoutAction: timeoutAction), colorStyle: 0xFFBA00, colorTextButton: 0xFFFFFF)

μ•ˆλ…•ν•˜μ„Έμš” @ahmedsafadii ,

이제 κΈ°κ°„κ³Ό 같은 ν˜•μ‹μ„ μ‚¬μš©ν•  수 μ—†μŠ΅λ‹ˆκΉŒ? 두 번째 & κ·Έ 이후에 μžλ™μœΌλ‘œ ν•΄μ œλ₯Ό μ§€μ •ν•˜κΈ°λ§Œ ν•˜λ©΄ λ©λ‹ˆλ‹€.

이 μΆ”κ°€ λ²„νŠΌ μ‹œλ‚˜λ¦¬μ˜€λ³΄λ‹€.

κ°μ‚¬ν•©λ‹ˆλ‹€,

@Piyush08

alertView.showInfo("", subTitle: "ABC", timeout: SCLAlertView.SCLTimeoutConfiguration(timeoutValue: 3, timeoutAction: SCLAlertView.SCLTimeoutConfiguration.ActionType = {
    print("")
}))

@ahmedsafadii

"'SCLAlertView.SCLTimeoutConfiguration.ActionType.Type' μœ ν˜•μ˜ λ³€κ²½ν•  수 μ—†λŠ” ν‘œν˜„μ‹μ— ν• λ‹Ήν•  수 μ—†μŒ(일λͺ… '(() -> ()).Type')"μ΄λΌλŠ” 였λ₯˜κ°€ 계속 λ°œμƒν•©λ‹ˆλ‹€.

@Piyush08

두 νŒŒμΌμ„ λͺ¨λ‘ μ΄κ²ƒμœΌλ‘œ λ°”κΏ‰λ‹ˆλ‹€.

https://github.com/vikmeup/SCLAlertView-Swift/files/1336488/Archive.zip

@ahmedsafadii μœ„μ—μ„œ μ–ΈκΈ‰ν–ˆλ“―μ΄ 이미 이것을 λŒ€μ²΄ν•©λ‹ˆλ‹€.

@Piyush08 μ—¬κΈ°μ„œ κ²½κ³ μ½”λ“œ 곡유 μžˆλ‚˜μš” ^^"

screen shot 2017-09-30 at 12 53 36 am

@Piyush08 μ½”λ“œ μ£Όμ„Έμš” :3

@ahmedsafadii 이미 μœ„μ˜ 이미지와 같이 곡유

@Piyush08 μ•Œμ•˜μ–΄

이 μ‹œλ„

@Piyush08

let timeoutAction: SCLAlertView.SCLTimeoutConfiguration.ActionType = {
        // action here
}

SCLAlertView().showError("test", subTitle: "test",timeout:SCLAlertView.SCLTimeoutConfiguration(timeoutValue: 3.0, timeoutAction:timeoutAction))

@ahmedsafadii

νš¨κ³Όκ°€μžˆλ‹€!

λΉ λ₯΄κ³  큰 도움을 μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€!

즐거운 μ½”λ”©!

@Piyush08 np ;)

이제 이것을 μƒˆλ‘œμš΄ Swift4 ν”„λ‘œμ νŠΈμ— μΆ”κ°€ν•˜κΈ° μœ„ν•œ μ›Œν¬ν”Œλ‘œλŠ” λ¬΄μ—‡μž…λ‹ˆκΉŒ?

@justdan0227 Swift4 λ₯Ό μ§€μ›ν•˜κΈ° μœ„ν•΄ λ³€κ²½ μ‚¬ν•­μœΌλ‘œ PR을 μƒμ„±ν•©λ‹ˆλ‹€. λ³‘ν•©ν•˜κ²Œ λ˜μ–΄ κΈ°μ©λ‹ˆλ‹€.

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰