SuggestionsKit is a framework for iOS that was created in order to provide developers with the opportunity to educate users on various features of applications.

Overview

SuggestionsKit

SuggestionsKit

CI Status Version License Platform

Description

SuggestionsKit is a framework for iOS that was created in order to provide developers with the opportunity to educate users on various features of applications.

Requirements

  • Xcode 11 / Swift 5+
  • iOS 9.0+

Features

  • Easy to use in project
  • Nice looking animations
  • Supports device rotations
  • Supports navigation items and tab bar items
  • Supports view resizing and changing of position via observation
  • Customizable settings

Usage

Import SuggestionsKit

import SuggestionsKit

Next you need to create one or more suggestions. Simple init method takes UIVIew, CGRect , String and NSAttributedString as arguments.

let frameSuggestion2 = Suggestion(frame: .init(x: 100, y: 100, width: 200, height: 200), attributedText: attributedString)

If you pass attributedText then text is ignored and if you pass view then frame ignored too.
If you pass attributedText then textColor and font from SuggestionsConfig.TextConfig is ignored

After you just call apply method of SuggestionManager class

SuggestionsManager.apply(suggestions)

Optionaly you could call configre method to setup suggestions which will presented to user. If this method will not be called then default configuration will be used

SuggestionsManager.apply(suggestions)
    .configre(config)

And you are done! Next step is just call startShowing method to start showing suggestions.

SuggestionsManager.apply(suggestions)
    .configre(config)
    .startShowing()

If suggestions ended whole view will dissapear automaticaly.
If you want to stop process manualy simply call stopShowing method of SuggestionManager class

SuggestionsManager.stopShowing()

If you want to be notified when suggestion come to an end just call completion method of SuggestionManager that takes void closure as an argument

SuggestionsManager.apply(suggestions)
    .configre(config)
    .startShowing()
    .completion {
        print("suggestions finished")
    }

Additionally you could create suggestion from tabBarController.tabBar or navigationController.navigationBar with help of SuggestionsHelper class

let tabBarItems = SuggestionsHelper.findAllBarItems(in: tabBarController?.tabBar)
suggestions += tabBarItems.enumerated()
    .map { Suggestion(view: $0.element, text: "Tab bar item \($0.offset)") }
    
let navItems = SuggestionsHelper.findAllBarItems(in: navigationController?.navigationBar)
let navSuggestions = navItems.enumerated()
    .map { Suggestion(view: $0.element, text: $0.offset == 0 ? "back button" : "bar button item") }
suggestions += navSuggestions

Please keep in mind that this functionality is implemented using recursive search of visual elements and may be broken in future versions of iOS
This method does not use private properties for searching

Example

To run the example project, clone the repo, open the SuggestionsKit.xcworkspace workspace, then select target SuggestionsKit-Example and you are ready to test the example

Installation

CocoaPods

SuggestionsKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SuggestionsKit'

Swift Package Manager

dependencies: [.package(url: "https://github.com/huemae/SuggestionsKit", Package.Dependency.Requirement.branch("master"))]

Author

huemae

License

SuggestionsKit is available under the MIT license. See the LICENSE file for more info.

You might also like...
WVWalkthroughView is an objective C based utility to highlight certain parts for iOS apps.
WVWalkthroughView is an objective C based utility to highlight certain parts for iOS apps.

WVWalkthroughView A simple utility written in Objective C to help developers walk a user through their app. It allows a message to be displayed, a par

A simple order manager, created in order to try Realm database
A simple order manager, created in order to try Realm database

Overview A simple order manager, created in order to get acquainted with the features and limitations of the local Realm database. The project is writ

Pendo captures product usage data, gathers user feedback, and lets you communicate in-app to onboard, educate, and guide users to value

Pendo SDK for IOS The Pendo Mobile SDK is a code-less, retro-active analytics collector across all of your app's versions. The SDK also allows present

App created in UIKit in order to control users' games library
App created in UIKit in order to control users' games library

App created in UIKit in order to control users' games library. It's developed in Swift 5 with Storyboard, and relies in a ASP.Net API backend.

Push notifications allow developers to reach users, even when users aren't actively using an app!
Push notifications allow developers to reach users, even when users aren't actively using an app!

Push notifications allow developers to reach users, even when users aren't actively using an app! With the latest update of iOS Apple provide very useful extensions which are user-friendly. In this tutorial, I am going to share the configuration, set up of Notification with the media attachments like.

Since Facebook introduced reactions in 2016, it became a standard in several applications as a way for users to interact with content. ReactionButton is a control that allows developers to add this functionality to their apps in an easy way.
A framework to provide logic designed to prompt users at the ideal moment for a review of your app/software

ReviewKit ReviewKit is a Swift package/framework that provides logic designed to prompt users at the ideal moment for a review of your app. At a basic

App made to educate people about cybersecurity and internet safety.

Cybersafe App made to educate people about cybersecurity and internet safety. [please open the app on an Iphone 11 if you have Xcode!] What to expect:

A MacOS app created to annoy users so users will go to bed during bedtime hours

A MacOS app created to annoy users so users will go to bed during bedtime hours. Developed for me as a school project.

In this project I chose MVVM architectural pattern in order to design applications structure.

SwinjectExample In this project I chose MVVM architectural pattern in order to design applications structure. Also I used "Swinject" framework for con

A multiplatform SwiftUI project demonstrating various SwiftUI features.

WikiDemo A multiplatform SwiftUI project demonstrating various SwiftUI features, including creating a master-detail interface. It's a multiplatform ve

UI framework that allows developers to integrate an amazing selection interface into their applications

UI framework that allows developers to integrate an amazing selection interface into their applications! Each bubble has a set of parameters, which could be configured individually.

BioMatrix is an app that allows users to quiz themselves on various biology questions!

Welcome to BioMatrix! It is an app that allows users to quiz themselves on a variety of biology questions! This app allows various functionalities!

InstagramLogin allows iOS developers to authenticate users by their Instagram accounts.
InstagramLogin allows iOS developers to authenticate users by their Instagram accounts.

InstagramLogin handles all the Instagram authentication process by showing a custom UIViewController with the login page and returning an access token that can be used to request data from Instagram.

An iOS pre-permissions utility that lets developers ask users on their own dialog for calendar, contacts, location, photos, reminders, twitter, push notifications and more, before making the system-based permission request.

An iOS pre-permissions utility that lets developers ask users on their own dialog for calendar, contacts, location, photos, reminders, twitter, push notifications and more, before making the system-based permission request.

Cluster's reusable pre-permissions utility that lets developers ask the users on their own dialog for photos or contacts access, before making the system-based request.
Cluster's reusable pre-permissions utility that lets developers ask the users on their own dialog for photos or contacts access, before making the system-based request.

Cluster's reusable pre-permissions utility that lets developers ask the users on their own dialog for photos or contacts access, before making the system-based request. This is based on the Medium post by Cluster describing the different ways to ask for iOS permissions (https://medium.com/p/96fa4eb54f2c).

Phimp.me - Photo Image Editor and Sharing App. Phimp.me is a Photo App for iOS that aims to replace proprietary photo applications. It offers features such as taking photos, adding filters, editing images and uploading them to social networks. This project is built to show how to support accessibility features in iOS applications in UIKit.
This project is built to show how to support accessibility features in iOS applications in UIKit.

ACCESSIBILITY EXAMPLE This project is built to show how to support accessibility features in iOS applications in a blog post. For the sake of Accessib

A set of SwiftUI dynamic property wrappers that provide a more familiar API for accessing the Contacts framework. (iOS, watchOS, macOS)

Connections Also available as a part of my SwiftUI+ Collection – just add it to Xcode 13+ A set of SwiftUI dynamic property wrappers that provide a mo

Comments
  • Support for alignment in NSAttributedString

    Support for alignment in NSAttributedString

    Hey, @huemae big thanks for writing this neat library.

    I have been playing around with it for a few days and ran into this issue. So I'm trying to left-align the text shown in the bubble. But can't get it working using Here is the snippet of the code I'm using NSAttributedString.

    let paragraphStyleLeftAlign = NSMutableParagraphStyle()
    paragraphStyleLeftAlign.alignment = .left
    
    let exampleAttrString1 = NSAttributedString(string: "frame suggestion #1 The quick brown fox jumps over the lazy dog, long text to test left align",
                                                attributes: [.font: UIFont.systemFont(ofSize: 25, weight: .thin),
                                                            .foregroundColor: UIColor.lightGray,
                                                            .paragraphStyle: paragraphStyleLeftAlign])
    

    Here is the output

    image

    As you can see the entire text is not aligned correctly.

    Any thoughts as to what might be going on? Or if this kind of NSAttributedString configuration would not be supported?

    opened by viralsavaniIM 3
Releases(1.2.4)
Owner
Ilya
Ilya
Showcase your awesome new app features 📱

WhatsNewKit enables you to easily showcase your awesome new app features. It's designed from the ground up to be fully customized to your needs. Featu

Sven Tiigi 2.8k Jan 3, 2023
✨ An elegant way to guide your beloved users in iOS apps - Material Showcase.

Material Showcase for iOS An elegant and beautiful tap showcase view for iOS apps based on Material Design Guidelines. Requirement iOS 10.0+ Swift 4.2

Aromajoin 349 Dec 5, 2022
A simple and attractive AlertView to onboard your users in your amazing world.

AlertOnboarding A simple and attractive AlertView to onboard your users in your amazing world. PRESENTATION This AlertOnboarding was inspired by this

Boisney Philippe 832 Jan 8, 2023
An iOS framework to easily create a beautiful and engaging onboarding experience with only a few lines of code.

Onboard Click Here For More Examples Important Onboard is no longer under active development, and as such if you create any issues or submit pull requ

Mike 6.5k Dec 17, 2022
A simple keyframe-based animation framework for iOS, written in Swift. Perfect for scrolling app intros.

RazzleDazzle is a simple AutoLayout-friendly keyframe animation framework for iOS, written in Swift. Perfect for scrolling app intros. RazzleDazzle gr

IFTTT 3.4k Jan 1, 2023
An iOS framework to easily create simple animated walkthrough, written in Swift.

Intro Overview An iOS framework to easily create simple animated walkthrough, written in Swift. Requirements iOS8 Installation with CocoaPods Intro is

Nurdaulet Bolatov 33 Oct 1, 2021
A simple keyframe-based animation framework for UIKit. Perfect for scrolling app intros.

Jazz Hands is a simple keyframe-based animation framework for UIKit. Animations can be controlled via gestures, scroll views, KVO, or ReactiveCocoa. J

IFTTT 6.4k Dec 28, 2022
BWWalkthrough is a simple library that helps you build custom walkthroughs for your iOS App

What is BWWalkthrough? BWWalkthrough (BWWT) is a class that helps you create Walkthroughs for your iOS Apps. It differs from other similar classes in

Yari @bitwaker 2.8k Jan 4, 2023
iOS library Paper Onboarding is a material design UI slider written on Swift.

iOS library Paper Onboarding is a material design UI slider written on Swift. We specialize in the designing and coding of custom UI

Ramotion 3.2k Jan 5, 2023
Fully customisable tooltip view in Swift for iOS.

Description EasyTipView is a fully customizable tooltip view written in Swift that can be used as a call to action or informative tip. Contents Featur

Teo 2.9k Dec 27, 2022