Code Monkey home page Code Monkey logo

swiftentrykit's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swiftentrykit's Issues

Unable to use example project

When I build the example project, I am getting "no such module 'QuickLayout' in the file EKMessageContentView.swift. And on the project navigator, I see a red "QuickLayout.xcodeproj".

What should I do here?

lifecycleEvents.willDisappear not called following swipe gesture

We were using the lifecycleEvents.willDisappear() closure to execute some code on closing the Entry (in our case we wanted it at the beginning of the animation out), and noticed that in certain cases this event is never called.

Specifically, when closing an Entry using a swipe gesture, willDisappear() is never called. See pull request for solution.

Support Image-less Alert Messages

Is your feature request related to a problem? Please describe.
SwiftEntryKit should offer an alert message without an image.

Describe the solution you'd like
Make the image optional and if nil, do not initialize an imageView at all.

Describe alternatives you've considered
Add separate preset model objects and views for alerts, but it creates reuse issue and redundancy.

Exclude keyWindow occupancy

Is your feature request related to a problem? Please describe.
EKWindow occupy application keyWindow while enrty attaching.
its overset any case to fetch correct application keyWindow, about present in keyWindow, about traversal with keyWindow

Describe the solution you'd like
should we show EKWindow used windowLevel-control like UIAlertViewController? That would not disturb the hierarchy of application windows

Describe alternatives you've considered

Additional context
i wish the better development with SwiftEntryKit

iPhone x issue

Hey!
I have an issue with iPhone X and safe area.
For some reason alert is placed above bottom safe area and when I scroll it, the alert view is increase. see the video bellow. How can I put my alert view on the bottom?
video: http://dropmefiles.com/gzaww

code is here:

    var attributes: EKAttributes
    
    attributes = .bottomFloat
    attributes.windowLevel = .alerts
    attributes.hapticFeedbackType = .success
    attributes.screenInteraction =  .forward
    attributes.entryInteraction = .absorbTouches
    attributes.scroll = .enabled(swipeable: true, pullbackAnimation: .jolt)
    attributes.screenBackground = .color(color: .clear)
    attributes.entryBackground = .color(color: .clear)
    attributes.entranceAnimation = .init(scale: .init(from: 0.9, to: 1, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0)), fade: .init(from: 0, to: 1, duration: 0.3))
    attributes.exitAnimation = .init(scale: .init(from: 1, to: 0.9, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0)), fade: .init(from: 1, to: 0, duration: 0.3))
    attributes.displayDuration = .infinity
    attributes.border = .value(color: .black, width: 0.5)
    attributes.shadow = .active(with: .init(color: .black, opacity: 0.3, radius: 5, offset: .zero))
    attributes.positionConstraints.size = .init(width: .constant(value: min(UIScreen.main.bounds.width, UIScreen.main.bounds.height)), height: .intrinsic)
    attributes.positionConstraints.verticalOffset = 0
    attributes.positionConstraints.safeArea = .empty(fillSafeArea: true)
    return attributes

Xcode 10 not use

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

iPhone (please complete the following information):

  • Device: [e.g. iPhone6]
  • iOS Version: [e.g. iOS9.3]
  • Xcode Version [e.g. 9.3]
  • Dependency Manager Version [e.g. CocoaPods 1.5.2, Carthage 0.29.0]
  • SwiftEntryKit Release # [e.g. 0.2.0]

Additional context
Add any other context about the problem here.

Screenshots / Video Links

Unable to install via CocoaPod

I added

pod 'SwiftEntryKit', '0.1.2'

and ran pod install

I get this message every time :(

[!] Unable to find a specification for SwiftEntryKit (= 0.1.2)

Example can not build and run

Example can not build and run
Open SwiftEntryKit.xcworkspace
Build and run
SwiftEntryKit-master/Source/MessageViews/EKMessageContentView.swift:10:8: No such module 'QuickLayout'

Use UIViewController as an entry

Is your feature request related to a problem? Please describe.
Use a UIViewController as an entry in addition to the standard solution of a UIView.

Describe the solution you'd like
Enable developers to directly use a UIViewController as an entry. Thus, simply calling display of the SwiftEntryKit type, should show the view of the view controller

Entry Continuity - Transform Entry into Another Entry

Is your feature request related to a problem? Please describe.
Transform an entry into another entry using the same attributes for both.

Describe the solution you'd like
Create an additional state and routine that handles a slicky transformation of entry.

Unable to run the Example Project

I wanted to run the example project so i followed
the below instruction guides
Run git clone with --recurse-submodules, to include QuickLayout as submodule, likewise:

$ git clone --recurse-submodules https://github.com/huri000/SwiftEntryKit.git

But i got error like
ld: warning: directory not found for option
ld: framework not found Pods_QuickLayoutiOSDemo
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Kindly check the screenshot
screen shot 2018-08-25 at 2 00 06 pm
Expected behavior
It should run Fine

  • Device: Simulator
  • iOS Version: iOS11.3
  • Xcode Version [e.g. 9.3]
  • Dependency Manager Version . CocoaPods 1.5.2,

CocoaPods issue

I'm getting this issue: [!] Unable to find a specification for SwiftEntryKit (= 0.1.5).
After setting the git path I get another error about QuickLayout: [!] Unable to find a specification for QuickLayout (= 1.0.13)
Running on CocoaPods 1.5.2

Blur doesn't work on iOS 10.3.1

Describe the bug
Regular bottom toast with blurred background doesn't work on iOS 10.3.1
To Reproduce
Steps to reproduce the behavior:

  1. open demo project
  2. show regular bottom toast

Screenshots
image

iPhone (please complete the following information):

  • iOS Version: 10.3.1
  • Xcode Version 9.4.1
  • SwiftEntryKit Release # 0.5.1

Multiple button support?

Is there a way to display multiple buttons on top of each other in such a way that they're stacked in the view? I briefly saw the documentation and saw that action-methods are supported, but how would one pass n-number of buttons, each with different delegate methods?

Feature request: Callback when presented and dismissed

Is your feature request related to a problem? Please describe.
I should have a callback when popup is presented and dismissed, to do actions after presented or dismissed popup.

Describe the solution you'd like
I should have a callback when popup is presented and dismissed.

Describe alternatives you've considered
Maybe it's possible to add a delegate with to methods when finishing the animation for presenting and same when dismissing.

Additional context
nothing

Showing EKPopUpMessageView close EKFormMessageView

First of all amazing goodlooking library!!!

I am showing a EKFormMessageView and pressing the button I validate the values of the textFields. And if one is worng I want to show EKPopUpMessageView like a Warning. But this action closes the FormMessageView. Why? Is there any chnace to keep the EKFormMessageView until all textfields are ok?

Thanks in advance.

[FR] Multi-select or single select SwiftEntry

Hello!

Based on a need I thought of implementing a SwiftEntry preset which allows you to select or multi-select items in a UITableView or UICollectionView.

The way I thought about it is that we can allow the developer to define their custom Cells or use a default cell, that has a title and accessory image with its selected accessory image. Thus, the developer would just need to pass models implementing this requirement.

As much as it would be desirable to make this with a UITableView, I think with a UICollectionView you can achieve much more different layouts with this single SwiftEntry preset.

Moreover, I guess we would need to define the maximum size the SwiftEntry can expand to before the UITableView or UICollectionView content becomes scrollable instead of expanding as much as it can to fit its content on the screen.

Would love to hear your thoughts about this and how you would go about implementing this feature!

ps: Thank you for this great project!

Allow presentation of Multiple Entries

Description
Kits can be used for multiple UI Categories & Visual Response which can, in-some cases, appear on the screen at the same time. A typical use case would be Form & Notes. Users interact with form and notes shows the stage of completion.

Solution
Allow multiple Kits to be visible at a given time.

Additional context
As entry push itself on top of the stack and replaces active window, it might not be possible to use current implementation to push a new kit onto stack without dismissing the existing one. By separating controller "screenBackground" from entry, the above scenario can be achieved.

PS
Very good job dear Sir.

Support Image-less Notification Message

Is your feature request related to a problem? Please describe.
SwiftEntryKit should offer a notification message without an image.

Describe the solution you'd like
Make the image optional and if nil, do not initialize an imageView at all.

Describe alternatives you've considered
Add separate preset model objects and views for notification and alert, but it creates reuse issue and redundancy.

iPhone X issue with presenting Alert right after previous was closed

Describe the bug
Hello!
There is issue when we are trying to show Alert when the previous one was closed.
To Reproduce
Steps to reproduce the behavior:

  1. show alert "centerFloat"
  2. In
SwiftEntryKit.dismiss(with: {
               
           })

show new alert "centerFloat"

Attribute:

var attributes: EKAttributes
attributes = .centerFloat
attributes.windowLevel = .normal
attributes.hapticFeedbackType = .success
attributes.screenInteraction = canBeClosed ? .dismiss : .absorbTouches
attributes.entryInteraction = .absorbTouches
attributes.roundCorners = .all(radius: 20)
attributes.scroll = .enabled(swipeable: canBeClosed ? true : false, pullbackAnimation: .jolt)
attributes.screenBackground = .color(color: UIColor(white: 0, alpha: 0.7))
attributes.entryBackground = .color(color: .white)
attributes.entranceAnimation = .init(scale: .init(from: 0.9, to: 1, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0)), fade: .init(from: 0, to: 1, duration: 0.3))
attributes.exitAnimation = .init(scale: .init(from: 1, to: 0.9, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0)), fade: .init(from: 1, to: 0, duration: 0.3))
attributes.displayDuration = .infinity
attributes.border = .value(color: .black, width: 0.5)
attributes.shadow = .active(with: .init(color: .black, opacity: 0.3, radius: 5, offset: .zero))
attributes.positionConstraints.maxSize = .init(width: .offset(value: CGFloat(40.0.dp)), height: .intrinsic)
attributes.positionConstraints.keyboardRelation = .bind(offset: .init(bottom: 10, screenEdgeResistance: 10))

  1. iPhone X freezes

iPhone (please complete the following information):

  • Device: only iPhone X
  • iOS Version: 11.
  • Xcode Version 9.4.1
  • Dependency Manager Version: CocoaPods 1.5.3
  • SwiftEntryKit Release # 0.5.1

Example Not Working Properly

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

iPhone (please complete the following information):

  • Device: [e.g. iPhone6]
  • iOS Version: [e.g. iOS9.3]
  • Xcode Version [e.g. 9.3]
  • Dependency Manager Version [e.g. CocoaPods 1.5.2, Carthage 0.29.0]
  • SwiftEntryKit Release # [e.g. 0.2.0]

Additional context
Add any other context about the problem here.

Screenshots / Video Links

RoundCorners after the latest update

After the latest update my popups appears without roundCorners.

To Reproduce
Steps to reproduce the behavior:
Attribute:

  var attributes: EKAttributes
     attributes = .centerFloat
     attributes.windowLevel = .normal
     attributes.hapticFeedbackType = .success
     attributes.screenInteraction =  canBeClosed ? .dismiss : .absorbTouches
     attributes.entryInteraction = .absorbTouches
     attributes.roundCorners = .all(radius: 20)
     attributes.scroll = .enabled(swipeable: canBeClosed ? true : false, pullbackAnimation: .jolt)
     attributes.screenBackground = .color(color: UIColor(white: 0, alpha: 0.7))
     attributes.entryBackground = .color(color: UIColor(white: 0, alpha: 0.7))
     attributes.entranceAnimation = .init(scale: .init(from: 0.9, to: 1, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0)), fade: .init(from: 0, to: 1, duration: 0.3))
     attributes.exitAnimation = .init(scale: .init(from: 1, to: 0.9, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0)), fade: .init(from: 1, to: 0, duration: 0.3))
     attributes.displayDuration = .infinity
     attributes.border = .value(color: .black, width: 0.5)
     attributes.shadow = .active(with: .init(color: .black, opacity: 0.3, radius: 5, offset: .zero))
     attributes.positionConstraints.maxSize = .init(width: .offset(value: CGFloat(40.0.dp)), height: .intrinsic)
     attributes.positionConstraints.keyboardRelation = .bind(offset: .init(bottom: 10, screenEdgeResistance: 10))
     return attributes

  • Device: [all]
  • iOS Version: [9.0, 10.3.1, 11.4]
  • Xcode Version [9.4.1]
  • Dependency Manager Version [CocoaPods 1.5.2]
  • SwiftEntryKit Release # 0.5.0

Status Bar Hidden

I'm displaying a nib that have button
In the dismiss for it I go to another VC but the status bar is hidden
and when UI debugging I found myself instantiating my VC in the entryKit hierarchy not in mine

Anyone have idea how to fix this or the right way to do it ?
** What I'm trying to do is to :

  • show a nib (I did) --> success
  • then click the button on it and make a transition to another VC (that the nib didn't come from) --> success but the issue above happened

Custom Interface

How can I create a custom interface.
Example add two button with action, label, image or whatever else

EKNotificationMessage has broken layout

Describe the bug
Seems there is a bug with EKNotificationMessage. See the different from example project with 0.5.1 and your gif example:

from gif example: toasts-48

from demo project: image

Seems the labels should be slightly higher than now.
iPhone (please complete the following information):

  • Device: all
  • iOS Version: all
  • Xcode Version: 9.4.1
  • SwiftEntryKit Release #0.5.1

Objective-C compatibility

Is your feature request related to a problem? Please describe.
How is the compatibility with objective-c code?

Describe the solution you'd like
To see how to use the library with objective-c

Describe alternatives you've considered
none so far

Additional context
I have a mixed objc-swift project (that we are migrating slowly and painfully) and I would like to use this awesome library

Display Multiple Entries At The Same Time

Is your feature request related to a problem? Please describe.
I would like to display multiple entries at the same time. Lets say a subtle message as statusbar overlay that says when you're offline plus an other one that displays custom notifications / infos as popups.

What I want to avoid is that the notifications dismiss the you're offline message.

Issue on presenting UIViewController

I use this code to present a UIViewController:

let vc = UIStoryboard(name: "Home", bundle: nil).instantiateViewController(withIdentifier: "VC") as! VC
SwiftEntryKit.display(entry: vc, using: .centerFloat)

But it does NOT work!!

  • SwiftEntryKit 0.5.6

Do I have to do anything else?

Deployment target is 9.3, not 9.0

Describe the bug
Hello. The deployment target for SwiftEntryKit is 9.3 from carthage. It should be 9.0.

To Reproduce
Steps to reproduce the behavior:

  1. install SwiftEntryKit through Carthage
    Expected behavior
    Should be 9.0
    Screenshots

iPhone (please complete the following information):

  • Xcode Version 9.4.1
  • Dependency Manager Version : Carthage 0.30.1
  • SwiftEntryKit version: 0.5.6

Keep Background Unchanged when 2 Consecutive Entry Screen Backgrounds Match

Is your feature request related to a problem? Please describe.
When an entry is displayed and another entry is pushed in, the background of the first entry animates out before the new entry is displayed. In case both entries have the same background configuration, the previous background should not animate out in order to generate continuity.

Describe the solution you'd like

  • Add Equatable protocol to EKAttributes.BackgroundStyle and implement ==.
  • In EKRootViewController, before animating the previous entry out, check for background-style equality.

EKAlertMessageView fail to layout all of the ButtonContents inside EKAlertMessage

EKAlertMessageView works fine when there are only five ButtonContents, but it fails when there are more than five ButtonContents.

Here is a screenshot of the symptom
screen shot 2018-06-06 at 16 32 02

My environment:

  • Xcode 9.4
  • iPhone 8 Plus 11.4 simulator
  • SwiftEntryKit 0.3.1

Code generating the menu

    func showPopUpOfPost(_ post: Post) {
        var image = UIImage()
        let semaphore = DispatchSemaphore(value: 1)
        if let url = post.profileURL {
            KingfisherManager.shared.retrieveImage(with: url, options: nil, progressBlock: nil) { (retrieved, error, cacheType, url) in
                if retrieved != nil {
                    image = retrieved!
                }
                semaphore.signal()
            }
        }
        semaphore.wait()
        let imageContent = EKProperty.ImageContent(image: image, size: CGSize(width: 36, height: 36), contentMode: UIViewContentMode.scaleAspectFit, makeRound: true)

        let title = EKProperty.LabelContent(text: UserManager.getBy(id: post.creatorID)!.displayName, style: .init(font: UIFont.boldSystemFont(ofSize: 17), color: .white))

        let description = EKProperty.LabelContent(text: post.displayMessage, style: .init(font: UIFont.systemFont(ofSize: 17), color: .white))

        let simpleMessage = EKSimpleMessage(image: imageContent, title: title, description: description)

        let hashTagButton = buttonContent(text: "Add hashtag")
        let reactionButton = buttonContent(text: "Add reaction")
        let commentButton = buttonContent(text: "Add comment")
        let bookmarkButton = buttonContent(text: "Bookmark")
        let copyButton = buttonContent(text: "Copy message")
        let pinButton = buttonContent(text: "Pin message")

        let buttonsBarContent = EKProperty.ButtonBarContent(with: hashTagButton, reactionButton, commentButton, bookmarkButton, copyButton, pinButton, separatorColor: .black, expandAnimatedly: true)

        let alertMessage = EKAlertMessage(simpleMessage: simpleMessage, imagePosition: .left, buttonBarContent: buttonsBarContent)

        let contentView = EKAlertMessageView(with: alertMessage)

        SwiftEntryKit.display(entry: contentView, using: Utilities.longPressPostAttribute)
    }

    private func buttonContent(text: String) -> EKProperty.ButtonContent {
        let font = UIFont.systemFont(ofSize: 14)
        let labelStyle = EKProperty.LabelStyle(font: font, color: .white)
        let label = EKProperty.LabelContent(text: text, style: labelStyle)
        return EKProperty.ButtonContent(label: label, backgroundColor: .clear, highlightedBackgroundColor: .black) {
            SwiftEntryKit.dismiss()
        }
    }

The attributes

class Utilities: NSObject {
    class var longPressPostAttribute: EKAttributes {
        var attributes: EKAttributes
        attributes = .bottomToast
        attributes.hapticFeedbackType = .success
        attributes.screenInteraction = .dismiss
        attributes.entryInteraction = .absorbTouches
        attributes.scroll = .enabled(swipeable: true, pullbackAnimation: .jolt)
        attributes.screenBackground = .color(color: UIColor.black.withAlphaComponent(0.8))
        attributes.entryBackground = .color(color: .highlight)
        attributes.entranceAnimation = .init(
            translate: .init(duration: 0.2, spring: .init(damping: 1, initialVelocity: 0)),
            scale: .init(from: 0.6, to: 1, duration: 0.2),
            fade: .init(from: 0.8, to: 1, duration: 0.1))
        attributes.exitAnimation = .init(
            scale: .init(from: 1, to: 0.7, duration: 0.3),
            fade: .init(from: 1, to: 0, duration: 0.3))
        attributes.displayDuration = .infinity
        attributes.border = .value(color: .black, width: 1)
        let minEdge = min(UIScreen.main.bounds.size.width, UIScreen.main.bounds.size.height)
        attributes.positionConstraints.maxSize = .init(width: .constant(value: minEdge), height: .intrinsic)

        return attributes
    }
}

Thanks for this beautiful library!

Custom view does not appear on OS 11.3/iPhone-X

Loading a custom view from a nib does not appear when called with SwiftEntryKit.display(...)

Steps to reproduce the behavior:

  1. Write custom view and load from nib like in the demo app
  2. Define attributes like in the demo app
  3. call SwiftEntryKit.display(entry: MyView(), using: attributes)
    -> nothing appear

Expected behavior
the view should appear

iPhone (please complete the following information):

  • Device: iPhone-X
  • iOS Version: 11.3
  • Xcode Version 9.4
  • Dependency Manager Version CocoaPods 1.5.2
  • SwiftEntryKit Release # 0.5

Source
class EditExpenseView: UIView {
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setup()
}

init() {
    super.init(frame: .zero)
    setup()
}

private func setup() {
    fromNib()
    clipsToBounds = true
    layer.cornerRadius = 5
}

}

extension NSObject {
var className: String {
return String(describing: type(of: self))
}

class var className: String {
    return String(describing: self)
}

}

extension UIView {

@discardableResult
func fromNib<T : UIView>() -> T? {
    guard let contentView = Bundle(for: type(of: self)).loadNibNamed(type(of: self).className, owner: self, options: nil)?.first as? T else {
        return nil
    }
    addSubview(contentView)
    contentView.fillSuperview()
    return contentView
}

}

    var attributes: EKAttributes
    
    attributes = .bottomFloat
    attributes.hapticFeedbackType = .success
    attributes.displayDuration = 3
    attributes.screenBackground = .clear
    attributes.entryBackground = .clear
    attributes.screenInteraction = .forward
    attributes.entryInteraction = .absorbTouches
    
    attributes.entranceAnimation = .init(translate: .init(duration: 0.5, spring: .init(damping: 0.9, initialVelocity: 0)),
                                         scale: .init(from: 0.8, to: 1, duration: 0.5, spring: .init(damping: 0.8, initialVelocity: 0)),
                                         fade: .init(from: 0.7, to: 1, duration: 0.3))
    attributes.exitAnimation = .init(translate: .init(duration: 0.5),
                                     scale: .init(from: 1, to: 0.8, duration: 0.5),
                                     fade: .init(from: 1, to: 0, duration: 0.5))
    attributes.popBehavior = .animated(animation: .init(translate: .init(duration: 0.3),
                                                        scale: .init(from: 1, to: 0.8, duration: 0.3)))
    attributes.shadow = .active(with: .init(color: .black, opacity: 0.3, radius: 6))
    attributes.positionConstraints.verticalOffset = 10
    attributes.positionConstraints.size = .init(width: .offset(value: 20), height: .intrinsic)
    attributes.positionConstraints.maxSize = .init(width: .constant(value: 375), height: .intrinsic)
    attributes.statusBar = .dark

//this works!
// let myview:EditExpenseView = EditExpenseView()
// myview.frame = CGRect(x: 10, y: 100, width: 200, height: 200)
// self.view.addSubview(myview)

    SwiftEntryKit.display(entry: EditExpenseView(), using: attributes) -> **here the entry does not appear**

Warnings on XCode 10

Describe the bug
When compiling with XCode 10 beta two warnings appear:

SwiftEntryKit/Source/Extensions/UIApplication+EKAppearance.swift:15:9: Setter for 'isStatusBarHidden' was deprecated in iOS 9.0: Use -[UIViewController prefersStatusBarHidden]
SwiftEntryKit/Source/Extensions/UIApplication+EKAppearance.swift:16:9: Setter for 'statusBarStyle' was deprecated in iOS 9.0: Use -[UIViewController preferredStatusBarStyle]

To Reproduce
Steps to reproduce the behavior:

  1. Compile the project with XCode 10 beta

Expected behavior
No warnings are shown.

iPhone (please complete the following information):

  • Device: all
  • iOS Version: 12
  • Xcode Version 10.0 beta 6 (10L232m)
  • Dependency Manager Version CocoaPods 1.5.0
  • SwiftEntryKit Release 0.5.9

Support Image-less Popup Message

Is your feature request related to a problem? Please describe.
SwiftEntryKit should offer a popup message without an image.

Describe the solution you'd like
Make the image optional and if nil, do not initialize an imageView at all.

Describe alternatives you've considered
Add separate preset model objects and views for popups, but it creates reuse issue and redundancy.

Status Bar Hidden Always

What if we want the status bar to always be hidden and not have the note, toast, etc. show it?

Unable to install pod

Describe the bug
Cocoapods errors out when trying to install SwiftEntryKit.

To Reproduce
Steps to reproduce the behavior:

  1. Run pod cache clean --all
  2. Run pod deintegrate
  3. Add pod 'SwiftEntryKit', '0.5.9' into the Podfile
  4. Run pod install
  5. See error

Expected behavior
Pod would be installed without errors.

Screenshots
None, but this is the output:

$: pod install
Analyzing dependencies
Fetching podspec for `Keys` from `Pods/CocoaPodsKeys`
[!] Unable to find a specification for `SwiftEntryKit (= 0.5.9)`

iPhone (please complete the following information):

  • Device: N/A
  • iOS Version: N/A
  • Xcode Version 9.4.1
  • Dependency Manager Version CocoaPods 1.5.3
  • SwiftEntryKit Release 0.5.9

Additional context
I tried adding the pod without a version, then also tried using a previous version, to no avail.

Podfile looks more or less like this:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

inhibit_all_warnings!

target 'main' do
  pod 'Alamofire', '~> 4.5'
  pod 'wpxmlrpc'
  pod 'Kingfisher'
  pod 'SwiftyBeaver'
  pod 'Fabric'
  pod 'Crashlytics'
  pod 'Auth0', '~> 1.0'
  pod 'SimpleKeychain', '~> 0.7'
  pod 'SwiftyRSA'
  pod 'AWSIoT', '~>2.6.0'
  pod 'DRPLoadingSpinner'
  pod 'SwiftEntryKit', '0.5.9'
end

Thanks!

EDIT: I just updated cocoapods to 1.5.3, same behavior

modalView on Login

Hi,

Short explanation
I´m using your excellent library to create a Login window.
I´m showing the login popup window on viewDidAppear event. The problem is that the line of code after the "showSigninForm(attributes:.." is executed inmediatelly after the window is shown.

how can I make this popup modal???

Thanks in advance.

How to get text content from forms.

I am checking the example but I don't understand how we can get the text from the form. I tried to print out content of textFields from following code but it didn't print out the text that I entered.

    private func showSigninForm(attributes: EKAttributes, style: FormStyle) {
        let title = EKProperty.LabelContent(text: "Sign in to your account", style: style.title)
        let textFields = FormFieldPresetFactory.fields(by: [.email, .password], style: style)
        let button = EKProperty.ButtonContent(label: .init(text: "Continue", style: style.buttonTitle), backgroundColor: style.buttonBackground, highlightedBackgroundColor: style.buttonBackground.withAlphaComponent(0.8)) {
            print(textFields)

            SwiftEntryKit.dismiss()
        }
        let contentView = EKFormMessageView(with: title, textFieldsContent: textFields, buttonContent: button)
        SwiftEntryKit.display(entry: contentView, using: attributes)
    }

PS: If I want to lets say show a country picker for any textfield, where can I add the code? I couldn't find any action for textFields.

How to check is there any alert on the screen?

Hello!
I have two questions:

  1. Is there any way to check if there is alert on the screen at this moment?
  2. If no, then how can I detect when alert was dismissed by user swipe and other actions?
    Thanks for this beautiful lib!

Service Rating

Is your feature request related to a problem? Please describe.
It seems like a fun, nice-to-have feature.

Describe the solution you'd like
A popup that displays a service rating. Customizable and animatable.

Error in pod files

Describe the bug
1- Pods/SwiftEntryKit/SwiftEntryKit/Model/EntryAttributes/EKAttributes+DisplayPriority.swift:20:19: Type 'EKAttributes.DisplayPriority' does not conform to protocol 'Hashable'

Adapt to keyboard changes

Hello,

I haven't found support or a way to adapt a displayed entry to keyboard showing/hiding, so that for example if the keyboard shows, a centred displayed entry will reposition by translating vertically.

So the question is: how can I change a displayed view position when the keyboard is shown/hid? Or, could you add support for it?

Thank you!

App freezes on iOS 9.3.2 when displaying an entry and there is one shown already

Describe the bug
While one entry is displayed on the screen, showing another entry freezes the app.

To Reproduce
Steps to reproduce the behavior:

  1. Display an entry;
  2. While one on the screen, display another one.
  3. See the app frozen.

Expected behavior
Multiple entries are shown one after another.

iPhone (please complete the following information):

  • Device: iPhone 5c
  • iOS Version: iOS 9.3.2
  • Xcode Version 9.4.1
  • Dependency Manager Version CocoaPods 1.4.0
  • SwiftEntryKit Release 0.5.5

Additional context
Works perfectly on iOS 10., iOS 11., and even iOS 9.2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.