1662112200
Please ★ this library.
Now, you don't have to download different libraries to include different font icons. This SwiftIcons library helps you use icons from any of the following font icons.
SwiftIcons supports different objects from the object library.
CocoaPods is a dependency manager for Cocoa projects.
Make sure you have the latest version of CocoaPods by running:
$ gem install cocoapods
# (or if the above fails)
$ sudo gem install cocoapods
Update your local specs repo by running:
$ pod repo update
Add the following lines to your Podfile
:
target 'YourProject' do
use_frameworks!
pod 'SwiftIcons', '~> 3.0'
end
Then run the following command
$ pod install
You can start using the library by importing it wherever you want
import SwiftIcons
Carthage is a decentralized dependency manager for Cocoa projects.
Install the latest version of Carthage.
Add this line to your Cartfile
:
github "ranesr/SwiftIcons" ~> 3.0
or for master
,
github "ranesr/SwiftIcons" "master"
Then run carthage update --platform ios
and add the built framework to your project by following these instructions from Carthage.
Copy all the files from Source
folder. Link to files.
Check to import all ttf files in project, "Project" > "Target" > "Copy Bundle Resources"
You can check library reference documentation here.
There are different font types for each of the font icons
Font Icons | Version | Font Types | Icons |
---|---|---|---|
Dripicons | 2.0 | dripicons | dripicons |
Emoji | emoji | emoji | |
FontAwesome | 5.1.0 | fontAwesome | fontAwesome |
Icofont | 1.0.0 Beta | icofont | icofont |
Ionicons | 2.0.1 | ionicons | ionicons |
Linearicons | 1.0.0 | linearIcons | linearIcons |
Map-icons | 3.0.2 | mapicons | mapicons |
Material icons | 2.2.0 | googleMaterialDesign | googleMaterialDesign |
Open iconic | 1.1.1 | openIconic | openIconic |
State face icons | state | state | |
Weather icons | 2.0.10 | weather | weather |
TypIcons | 2.0.7 | TypIcons | Typicons |
When setting an icon to any object, you have to mention which font type it is and then select which icon you want to set from that particular font icon.
import SwiftIcons
UIImage.init(icon: .emoji(.airplane), size: CGSize(width: 35, height: 35))
// Icon with colors
UIImage.init(icon: .emoji(.airplane), size: CGSize(width: 35, height: 35), textColor: .red)
UIImage.init(icon: .emoji(.airplane), size: CGSize(width: 35, height: 35), textColor: .white, backgroundColor: .red)
// Stacked icons with bigger background
UIImage.init(bgIcon: .fontAwesomeRegular(.circle), topIcon: .fontAwesomeRegular(.square))
// Stacked icons with smaller background
UIImage.init(bgIcon: .fontAwesomeSolid(.camera), topIcon: .fontAwesomeSolid(.ban), topTextColor: .red, bgLarge: false)
// Stacked icons with custom size
UIImage.init(bgIcon: .fontAwesomeSolid(.camera), topIcon: .fontAwesomeSolid(.ban), topTextColor: .red, bgLarge: false, size: CGSize(width: 50, height: 50))
import SwiftIcons
// Setting icon to image view
imageView.setIcon(icon: .weather(.rainMix))
// Icon with colors
imageView.setIcon(icon: .mapicons(.amusementPark), textColor: .white, backgroundColor: .blue, size: nil)
import SwiftIcons
// Setting icon to label
label.setIcon(icon: .ionicons(.paintbrush), iconSize: 70)
// Icon with colors
label.setIcon(icon: .googleMaterialDesign(.rowing), iconSize: 70, color: .white, bgColor: textColor)
// Icon with text around it
label.setIcon(prefixText: "Bus ", icon: .linearIcons(.bus), postfixText: " icon", size: 20)
// Icon with color & colored text around it
label.setIcon(prefixText: "Medal ", prefixTextColor: .red, icon: .ionicons(.ribbonA), iconColor: .red, postfixText: "", postfixTextColor: .red, size: nil, iconSize: 40)
// Icon with text with different fonts around it
label.setIcon(prefixText: "Font ", prefixTextFont: font1!, icon: .fontAwesomeSolid(.font), postfixText: " icon", postfixTextFont: font2!)
// Icon with text with different fonts & colors around it
label.setIcon(prefixText: "Bike ", prefixTextFont: font1!, prefixTextColor: .red, icon: .mapicons(.bicycling), iconColor: textColor, postfixText: " icon", postfixTextFont: font2!, postfixTextColor: .blue, iconSize: 30)
import SwiftIcons
// Setting icon to button
button.setIcon(icon: .linearIcons(.phone), forState: .normal)
// Icon with size and color
button.setIcon(icon: .openIconic(.clipboard), iconSize: 70, color: .blue, forState: .normal)
// Icon with text around it
button.setIcon(prefixText: "Please ", icon: .googleMaterialDesign(.print), postfixText: " print", forState: .normal)
// Icon with color & colored text around it
button.setIcon(prefixText: "Lock ", prefixTextColor: .red, icon: .googleMaterialDesign(.lock), iconColor: .yellow, postfixText: " icon", postfixTextColor: .blue, forState: .normal, textSize: 15, iconSize: 20)
// Icon with text with different fonts around it
button.setIcon(prefixText: "Happy ", prefixTextFont: font1!, icon: .ionicons(.happy), postfixText: " face", postfixTextFont: font2!, forState: .normal)
// Icon with text with different fonts & colors around it
button.setIcon(prefixText: "Pulse ", prefixTextFont: font1!, prefixTextColor: .darkGray, icon: .openIconic(.pulse), iconColor: .red, postfixText: " icon", postfixTextFont: font2!, postfixTextColor: .purple, forState: .normal, iconSize: 40)
// Icon with title below icon
button.setIcon(icon: .emoji(.ferrisWheel), title: "Ferris Wheel", color: .red, forState: .normal)
// Icon with title below icon with different color & custom font
button.setIcon(icon: .weather(.rainMix), iconColor: .yellow, title: "RAIN MIX", titleColor: .red, font: font!, backgroundColor: .clear, borderSize: 1, borderColor: .green, forState: .normal)
import SwiftIcons
// Setting icon at particular index
segmentedControl.setIcon(icon: .linearIcons(.thumbsUp), forSegmentAtIndex: 0)
segmentedControl.setIcon(icon: .linearIcons(.thumbsDown), forSegmentAtIndex: 1)
// Icons with sizes & colors
segmentedControl.setIcon(icon: .fontAwesomeSolid(.male), color: .red, iconSize: 50, forSegmentAtIndex: 0)
segmentedControl.setIcon(icon: .fontAwesomeSolid(.female), color: .purple, iconSize: 50, forSegmentAtIndex: 1)
import SwiftIcons
// Setting icon to tab bar item
tabBar.items?[0].setIcon(icon: .fontAwesomeSolid(.font), size: nil, textColor: .lightGray)
// Stacked icons for tab bar item
tabBar.items?[1].setIcon(bgIcon: .fontAwesomeRegular(.circle), bgTextColor: .lightGray, topIcon: .fontAwesomeSolid(.square), topTextColor: .lightGray, bgLarge: true, size: nil)
import SwiftIcons
// Change minimum & maximum value icons
slider.setMaximumValueIcon(icon: .emoji(.digitNine))
slider.setMinimumValueIcon(icon: .emoji(.digitZero))
// Change minimum & maximum value icons with colors
slider.setMaximumValueIcon(icon: .linearIcons(.pointerUp), customSize: nil, textColor: .red, backgroundColor: .clear)
slider.setMinimumValueIcon(icon: .linearIcons(.pointerDown), customSize: nil, textColor: .blue, backgroundColor: .clear)
import SwiftIcons
// Setting icon to bar button item
barButtonItem.setIcon(icon: .ionicons(.iosFootball), iconSize: 30)
// Icon with colors
barButtonItem.setIcon(icon: .ionicons(.iosFootball), iconSize: 30, color: textColor)
// Icon with custom cgRect
barButtonItem.setIcon(icon: .ionicons(.iosFootball), iconSize: 30, color: textColor, cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), target: self, action: #selector(barButtonItem(sender:)))
// Icon with text around it
barButtonItem.setIcon(prefixText: "Please ", icon: .ionicons(.iosDownload), postfixText: " download", cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), size: 23, target: self, action: #selector(barButtonItem(sender:)))
// Icon with color & colored text around it
barButtonItem.setIcon(prefixText: "Blue ", prefixTextColor: .red, icon: .ionicons(.iosFootball), iconColor: .blue, postfixText: " football", postfixTextColor: .green, cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), size: 20, iconSize: 30, target: self, action: #selector(barButtonItem(sender:)))
// Icon with text with different fonts around it
barButtonItem.setIcon(prefixText: "Digit ", prefixTextFont: font1!, icon: .emoji(.digitOne), postfixText: " One", postfixTextFont: font2!, cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), target: self, action: #selector(barButtonItem(sender:)))
// Icon with text with different fonts & colors around it
barButtonItem.setIcon(prefixText: "", prefixTextFont: font1!, prefixTextColor: .red, icon: .ionicons(.iosFootball), iconColor: .blue, postfixText: " football", postfixTextFont: font2!, postfixTextColor: .green, cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), iconSize: 24, target: self, action: #selector(barButtonItem(sender:)))
import SwiftIcons
// Setting icon to the title
self.setTitleIcon(icon: .emoji(.animalHorse), iconSize: 30, color: .red)
import SwiftIcons
// Setting left view icon
textfield.setLeftViewIcon(icon: .fontAwesomeSolid(.search))
// Left view icon with colors & leftViewMode
textfield.setLeftViewIcon(icon: .state(.TX), leftViewMode: .always, textColor: .blue, backgroundColor: .clear, size: nil)
textfield.setLeftViewIcon(icon: .googleMaterialDesign(.plusOne), leftViewMode: .unlessEditing, textColor: .green, backgroundColor: .clear, size: nil)
// Setting right view icon
textfield.setRightViewIcon(icon: .openIconic(.questionMark))
// Right view icon with colors & rightViewMode
textfield.setRightViewIcon(icon: .weather(.rainMix), rightViewMode: .always, textColor: .red, backgroundColor: .clear, size: nil)
import SwiftIcons
// Setting icons
stepper.setDecrementIcon(icon: .ionicons(.iosPause), forState: .normal)
stepper.setIncrementIcon(icon: .ionicons(.iosPlay), forState: .normal)
Please check out the SwiftIcons App. In the demo project, if you click on any object, you will see the method description in the logs for the icon of that object.
If you are using SwiftIcons in your app and want to be listed here, simply create a new issue here.
I am always curious who is using my projects 😊
Saurabh Rane
Special thanks to Patrik Vaberer and his initial work on Font-Awesome-Swift library
Author: ranesr
Source code: https://github.com/ranesr/SwiftIcons
License: MIT license
#swift
1600430400
Swift is a fast and efficient general-purpose programming language that provides real-time feedback and can be seamlessly incorporated into existing Objective-C code. This is why developers are able to write safer, more reliable code while saving time. It aims to be the best language that can be used for various purposes ranging from systems programming to mobile as well as desktop apps and scaling up to cloud services.
Below here, we list down the 10 best online resources to learn Swift language.
(The list is in no particular order)
#developers corner #free online resources to learn swift language #learn swift #learn swift free #learn swift online free #resources to learn swift #swift language #swift programming
1609999986
A thoroughly researched list of top Swift developers with ratings & reviews to help find the best Swift development companies around the world.
#swift development service providers #best swift development companies #top swift development companies #swift development solutions #top swift developers #swift
1594193714
Want to create a native iOS application for your Startup?
Hire Dedicated Swift Developers for end-to-end services like development, migration, upgrade, testing, and support & maintenance. Trust HourlyDeveloper.io our Swift development team for iOS device apps that are high on performance and security.
Consult with experts:- https://bit.ly/2C5M6cz
#hire dedicated swift developers #swift developers #swift development company #swift development services #swift development #swift
1675107840
Swift Library for Font Icons
Please ★ this library.
Now, you don't have to download different libraries to include different font icons. This SwiftIcons library helps you use icons from any of the following font icons.
SwiftIcons supports different objects from the object library.
CocoaPods is a dependency manager for Cocoa projects.
Make sure you have the latest version of CocoaPods by running:
$ gem install cocoapods
# (or if the above fails)
$ sudo gem install cocoapods
Update your local specs repo by running:
$ pod repo update
Add the following lines to your Podfile
:
target 'YourProject' do
use_frameworks!
pod 'SwiftIcons', '~> 3.0'
end
Then run the following command
$ pod install
You can start using the library by importing it wherever you want
import SwiftIcons
Carthage is a decentralized dependency manager for Cocoa projects.
Install the latest version of Carthage.
Add this line to your Cartfile
:
github "ranesr/SwiftIcons" ~> 3.0
or for master
,
github "ranesr/SwiftIcons" "master"
Then run carthage update --platform ios
and add the built framework to your project by following these instructions from Carthage.
Copy all the files from Source
folder. Link to files.
Check to import all ttf files in project, "Project" > "Target" > "Copy Bundle Resources"
You can check library reference documentation here.
There are different font types for each of the font icons
Font Icons | Version | Font Types | Icons |
---|---|---|---|
Dripicons | 2.0 | dripicons | dripicons |
Emoji | emoji | emoji | |
FontAwesome | 5.1.0 | fontAwesome | fontAwesome |
Icofont | 1.0.0 Beta | icofont | icofont |
Ionicons | 2.0.1 | ionicons | ionicons |
Linearicons | 1.0.0 | linearIcons | linearIcons |
Map-icons | 3.0.2 | mapicons | mapicons |
Material icons | 2.2.0 | googleMaterialDesign | googleMaterialDesign |
Open iconic | 1.1.1 | openIconic | openIconic |
State face icons | state | state | |
Weather icons | 2.0.10 | weather | weather |
TypIcons | 2.0.7 | TypIcons | Typicons |
When setting an icon to any object, you have to mention which font type it is and then select which icon you want to set from that particular font icon.
import SwiftIcons
UIImage.init(icon: .emoji(.airplane), size: CGSize(width: 35, height: 35))
// Icon with colors
UIImage.init(icon: .emoji(.airplane), size: CGSize(width: 35, height: 35), textColor: .red)
UIImage.init(icon: .emoji(.airplane), size: CGSize(width: 35, height: 35), textColor: .white, backgroundColor: .red)
// Stacked icons with bigger background
UIImage.init(bgIcon: .fontAwesomeRegular(.circle), topIcon: .fontAwesomeRegular(.square))
// Stacked icons with smaller background
UIImage.init(bgIcon: .fontAwesomeSolid(.camera), topIcon: .fontAwesomeSolid(.ban), topTextColor: .red, bgLarge: false)
// Stacked icons with custom size
UIImage.init(bgIcon: .fontAwesomeSolid(.camera), topIcon: .fontAwesomeSolid(.ban), topTextColor: .red, bgLarge: false, size: CGSize(width: 50, height: 50))
import SwiftIcons
// Setting icon to image view
imageView.setIcon(icon: .weather(.rainMix))
// Icon with colors
imageView.setIcon(icon: .mapicons(.amusementPark), textColor: .white, backgroundColor: .blue, size: nil)
import SwiftIcons
// Setting icon to label
label.setIcon(icon: .ionicons(.paintbrush), iconSize: 70)
// Icon with colors
label.setIcon(icon: .googleMaterialDesign(.rowing), iconSize: 70, color: .white, bgColor: textColor)
// Icon with text around it
label.setIcon(prefixText: "Bus ", icon: .linearIcons(.bus), postfixText: " icon", size: 20)
// Icon with color & colored text around it
label.setIcon(prefixText: "Medal ", prefixTextColor: .red, icon: .ionicons(.ribbonA), iconColor: .red, postfixText: "", postfixTextColor: .red, size: nil, iconSize: 40)
// Icon with text with different fonts around it
label.setIcon(prefixText: "Font ", prefixTextFont: font1!, icon: .fontAwesomeSolid(.font), postfixText: " icon", postfixTextFont: font2!)
// Icon with text with different fonts & colors around it
label.setIcon(prefixText: "Bike ", prefixTextFont: font1!, prefixTextColor: .red, icon: .mapicons(.bicycling), iconColor: textColor, postfixText: " icon", postfixTextFont: font2!, postfixTextColor: .blue, iconSize: 30)
import SwiftIcons
// Setting icon to button
button.setIcon(icon: .linearIcons(.phone), forState: .normal)
// Icon with size and color
button.setIcon(icon: .openIconic(.clipboard), iconSize: 70, color: .blue, forState: .normal)
// Icon with text around it
button.setIcon(prefixText: "Please ", icon: .googleMaterialDesign(.print), postfixText: " print", forState: .normal)
// Icon with color & colored text around it
button.setIcon(prefixText: "Lock ", prefixTextColor: .red, icon: .googleMaterialDesign(.lock), iconColor: .yellow, postfixText: " icon", postfixTextColor: .blue, forState: .normal, textSize: 15, iconSize: 20)
// Icon with text with different fonts around it
button.setIcon(prefixText: "Happy ", prefixTextFont: font1!, icon: .ionicons(.happy), postfixText: " face", postfixTextFont: font2!, forState: .normal)
// Icon with text with different fonts & colors around it
button.setIcon(prefixText: "Pulse ", prefixTextFont: font1!, prefixTextColor: .darkGray, icon: .openIconic(.pulse), iconColor: .red, postfixText: " icon", postfixTextFont: font2!, postfixTextColor: .purple, forState: .normal, iconSize: 40)
// Icon with title below icon
button.setIcon(icon: .emoji(.ferrisWheel), title: "Ferris Wheel", color: .red, forState: .normal)
// Icon with title below icon with different color & custom font
button.setIcon(icon: .weather(.rainMix), iconColor: .yellow, title: "RAIN MIX", titleColor: .red, font: font!, backgroundColor: .clear, borderSize: 1, borderColor: .green, forState: .normal)
import SwiftIcons
// Setting icon at particular index
segmentedControl.setIcon(icon: .linearIcons(.thumbsUp), forSegmentAtIndex: 0)
segmentedControl.setIcon(icon: .linearIcons(.thumbsDown), forSegmentAtIndex: 1)
// Icons with sizes & colors
segmentedControl.setIcon(icon: .fontAwesomeSolid(.male), color: .red, iconSize: 50, forSegmentAtIndex: 0)
segmentedControl.setIcon(icon: .fontAwesomeSolid(.female), color: .purple, iconSize: 50, forSegmentAtIndex: 1)
import SwiftIcons
// Setting icon to tab bar item
tabBar.items?[0].setIcon(icon: .fontAwesomeSolid(.font), size: nil, textColor: .lightGray)
// Stacked icons for tab bar item
tabBar.items?[1].setIcon(bgIcon: .fontAwesomeRegular(.circle), bgTextColor: .lightGray, topIcon: .fontAwesomeSolid(.square), topTextColor: .lightGray, bgLarge: true, size: nil)
import SwiftIcons
// Change minimum & maximum value icons
slider.setMaximumValueIcon(icon: .emoji(.digitNine))
slider.setMinimumValueIcon(icon: .emoji(.digitZero))
// Change minimum & maximum value icons with colors
slider.setMaximumValueIcon(icon: .linearIcons(.pointerUp), customSize: nil, textColor: .red, backgroundColor: .clear)
slider.setMinimumValueIcon(icon: .linearIcons(.pointerDown), customSize: nil, textColor: .blue, backgroundColor: .clear)
import SwiftIcons
// Setting icon to bar button item
barButtonItem.setIcon(icon: .ionicons(.iosFootball), iconSize: 30)
// Icon with colors
barButtonItem.setIcon(icon: .ionicons(.iosFootball), iconSize: 30, color: textColor)
// Icon with custom cgRect
barButtonItem.setIcon(icon: .ionicons(.iosFootball), iconSize: 30, color: textColor, cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), target: self, action: #selector(barButtonItem(sender:)))
// Icon with text around it
barButtonItem.setIcon(prefixText: "Please ", icon: .ionicons(.iosDownload), postfixText: " download", cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), size: 23, target: self, action: #selector(barButtonItem(sender:)))
// Icon with color & colored text around it
barButtonItem.setIcon(prefixText: "Blue ", prefixTextColor: .red, icon: .ionicons(.iosFootball), iconColor: .blue, postfixText: " football", postfixTextColor: .green, cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), size: 20, iconSize: 30, target: self, action: #selector(barButtonItem(sender:)))
// Icon with text with different fonts around it
barButtonItem.setIcon(prefixText: "Digit ", prefixTextFont: font1!, icon: .emoji(.digitOne), postfixText: " One", postfixTextFont: font2!, cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), target: self, action: #selector(barButtonItem(sender:)))
// Icon with text with different fonts & colors around it
barButtonItem.setIcon(prefixText: "", prefixTextFont: font1!, prefixTextColor: .red, icon: .ionicons(.iosFootball), iconColor: .blue, postfixText: " football", postfixTextFont: font2!, postfixTextColor: .green, cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), iconSize: 24, target: self, action: #selector(barButtonItem(sender:)))
import SwiftIcons
// Setting icon to the title
self.setTitleIcon(icon: .emoji(.animalHorse), iconSize: 30, color: .red)
import SwiftIcons
// Setting left view icon
textfield.setLeftViewIcon(icon: .fontAwesomeSolid(.search))
// Left view icon with colors & leftViewMode
textfield.setLeftViewIcon(icon: .state(.TX), leftViewMode: .always, textColor: .blue, backgroundColor: .clear, size: nil)
textfield.setLeftViewIcon(icon: .googleMaterialDesign(.plusOne), leftViewMode: .unlessEditing, textColor: .green, backgroundColor: .clear, size: nil)
// Setting right view icon
textfield.setRightViewIcon(icon: .openIconic(.questionMark))
// Right view icon with colors & rightViewMode
textfield.setRightViewIcon(icon: .weather(.rainMix), rightViewMode: .always, textColor: .red, backgroundColor: .clear, size: nil)
import SwiftIcons
// Setting icons
stepper.setDecrementIcon(icon: .ionicons(.iosPause), forState: .normal)
stepper.setIncrementIcon(icon: .ionicons(.iosPlay), forState: .normal)
Please check out the SwiftIcons App. In the demo project, if you click on any object, you will see the method description in the logs for the icon of that object.
If you are using SwiftIcons in your app and want to be listed here, simply create a new issue here.
I am always curious who is using my projects 😊
Author: Ranesr
Source Code: https://github.com/ranesr/SwiftIcons
License: MIT license
1657310040
An assistant to manage the interactions between view and model
ModelAssistant is a mediator between the view and model. This framework is tailored to work in conjunction with views that present collections of objects. These views typically expect their data source to present results as a list of sections made up of rows. ModelAssistant can efficiently analyze model objects and categorize them in sections. In addition it updates adopted view to its delegate, based on model objects changes.
Now using modelAssitant is really easy with just two lines of codes, and delegates will be implement automatically to your collection view.
See Usage for new way of implementing modelAssistant.
Upgraded to Swift 5
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate ModelAssistant into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Name>' do
pod 'ModelAssistant'
end
If you are not upgraded to Swift 4.2, use the last non-swift 4.2 compatible release:
If you are using swift 4, replace pod 'ModelAssistant'
with this:
pod 'ModelAssistant', '1.0.1' #Swift 4
If you are using swift 3, replace pod 'ModelAssistant'
with this:
pod 'ModelAssistant', '1.0.0' #Swift 3
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate ModelAssistant into your Xcode project using Carthage, specify it in your Cartfile
:
github "ssamadgh/ModelAssistant"
Run carthage update --platform iOS
to build the framework and drag the built ModelAssistant.framework
into your Xcode project.
If you prefer not to use any of the aforementioned dependency managers, you can integrate ModelAssistant into your project manually.
Open up Terminal, cd
into your top-level project directory, and run the following command "if" your project is not initialized as a git repository:
$ git init
Add ModelAssistant as a git submodule by running the following command:
$ git submodule add https://github.com/ssamadgh/ModelAssistant.git
Open the new ModelAssistant
folder, and drag the ModelAssistant.xcodeproj
into the Project Navigator of your application's Xcode project.
It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter.
Select the ModelAssistant.xcodeproj
in the Project Navigator and verify the deployment target matches that of your application target.
Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar.
In the tab bar at the top of that window, open the "General" panel.
Click on the +
button under the "Embedded Binaries" section.
You will see two different ModelAssistant.xcodeproj
folders each with a ModelAssistant.framework
nested inside a Products
folder.
It does not matter which
Products
folder you choose from.
Select the ModelAssistant.framework
.
And that's it!
The
ModelAssistant.framework
is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device.
ModelAssistant is fully compatible with all kind of design patterns. It doesn't violate them, instead it finds its place and sit there! As a guide the position of ModelAssistant in some of famous design patterns is as follows:
Design Pattern | ModelAssistant Position |
---|---|
MVC | Controller |
MVP | Presenter |
MVVM | ViewModel |
VIPER | Presenter |
ModelAssistant is owned and maintained by the Seyed Samad Gholamzadeh. You can follow me on Twitter at @ssamadgh for project updates and releases.
ModelAssistant is released under the MIT license. See LICENSE for details.
Author: ssamadgh
Source Code: https://github.com/ssamadgh/ModelAssistant
License: MIT license