├── .swift-version
├── Screenshots
├── Usage.gif
├── Screenshot-1.png
├── Usage-Screenshot-1.png
└── Usage-Screenshot-2.png
├── Feelings
├── Feelings
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── filled.imageset
│ │ │ ├── filled.png
│ │ │ └── Contents.json
│ │ ├── unfilled.imageset
│ │ │ ├── unfilled.png
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── AppDelegate.swift
│ ├── ViewController.swift
│ └── Source
│ │ └── FeelingsView.swift
└── Feelings.xcodeproj
│ ├── project.xcworkspace
│ └── contents.xcworkspacedata
│ ├── xcshareddata
│ └── xcschemes
│ │ └── Feelings.xcscheme
│ └── project.pbxproj
├── .travis.yml
├── CHANGELOG.md
├── FeelingsView.podspec
├── LICENSE
├── .gitignore
└── README.md
/.swift-version:
--------------------------------------------------------------------------------
1 | 3.0
2 |
--------------------------------------------------------------------------------
/Screenshots/Usage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hemangshah/Feelings/HEAD/Screenshots/Usage.gif
--------------------------------------------------------------------------------
/Screenshots/Screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hemangshah/Feelings/HEAD/Screenshots/Screenshot-1.png
--------------------------------------------------------------------------------
/Screenshots/Usage-Screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hemangshah/Feelings/HEAD/Screenshots/Usage-Screenshot-1.png
--------------------------------------------------------------------------------
/Screenshots/Usage-Screenshot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hemangshah/Feelings/HEAD/Screenshots/Usage-Screenshot-2.png
--------------------------------------------------------------------------------
/Feelings/Feelings/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | osx_image: xcode8.0
2 | language: objective-c
3 |
4 | xcode_project: Feelings.xcodeproj
5 |
6 | # whitelist
7 | branches:
8 | only:
9 | - master
10 |
--------------------------------------------------------------------------------
/Feelings/Feelings/Assets.xcassets/filled.imageset/filled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hemangshah/Feelings/HEAD/Feelings/Feelings/Assets.xcassets/filled.imageset/filled.png
--------------------------------------------------------------------------------
/Feelings/Feelings/Assets.xcassets/unfilled.imageset/unfilled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hemangshah/Feelings/HEAD/Feelings/Feelings/Assets.xcassets/unfilled.imageset/unfilled.png
--------------------------------------------------------------------------------
/Feelings/Feelings.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Feelings/Feelings/Assets.xcassets/filled.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "filled.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Feelings/Feelings/Assets.xcassets/unfilled.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "unfilled.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 |
3 | All notable changes to this project will be documented in this file.
4 |
5 | Latest release is available [here](https://github.com/hemangshah/Feelings/releases/latest).
6 |
7 | ## [1.1](https://github.com/hemangshah/Feelings/releases/tag/1.1) - Jul 06, 2017
8 | ## Fixed
9 | - https://github.com/hemangshah/Feelings/issues/1
10 |
11 | ## [1.0](https://github.com/hemangshah/Feelings/releases/tag/1.0) - Jun 19, 2017
12 | - Added support to install with the CocoaPods [here](https://cocoapods.org/pods/FeelingsView).
13 |
--------------------------------------------------------------------------------
/FeelingsView.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'FeelingsView'
3 | s.module_name = 'FeelingsView'
4 | s.version = '1.1'
5 | s.summary = 'Another rating view to share your feelings. 🎭'
6 | s.description = 'Want to create a feedback view for your business. Feelings would be the best choise to add in your next iOS app.'
7 | s.homepage = 'https://github.com/hemangshah/Feelings'
8 | s.license = 'MIT'
9 | s.author = { 'hemangshah' => 'hemangshah.in@gmail.com' }
10 | s.source = { :git => 'https://github.com/hemangshah/Feelings.git', :tag => s.version.to_s }
11 | s.platform = :ios, '9.0'
12 | s.requires_arc = true
13 | s.source_files = 'Feelings/Feelings/Source/*.swift'
14 | end
15 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Hemang Shah
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Feelings/Feelings/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.1
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Feelings/Feelings/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Feelings/Feelings/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/Feelings/Feelings/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Feelings
4 | //
5 | // Created by Hemang Shah on 6/14/17.
6 | // Copyright © 2017 Hemang Shah. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Feelings/Feelings/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Feelings
4 | //
5 | // Created by Hemang Shah on 6/14/17.
6 | // Copyright © 2017 Hemang Shah. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 |
17 | //Create Sample Arrays
18 | let rows = ["Quality","Price","Value"]
19 | let columns = ["1 Star","2 Star","3 Star","4 Star","5 Star"]
20 |
21 | //Create FeelingsView
22 | //Note: You should provide two images for FeelingsView. 1. Filled and 2. Unfilled
23 | let viewFeeling = FeelingsView.init(frame: CGRect.init(x: 0.0, y: 0.0, width: 300.0, height: 200.0))
24 | viewFeeling.backgroundColor = UIColor.clear
25 | viewFeeling.autoresizingMask = [.flexibleLeftMargin, .flexibleRightMargin, .flexibleTopMargin, .flexibleBottomMargin]
26 | self.view.addSubview(viewFeeling)
27 | viewFeeling.center = self.view.center
28 |
29 | //Setting fill/unfill images for FeelingsView
30 | viewFeeling.fillImage = UIImage.init(named: "filled.png")!
31 | viewFeeling.unfillImage = UIImage.init(named: "unfilled.png")!
32 |
33 | //Setting up values for FeelingsView
34 | viewFeeling.columnTitles = columns
35 | viewFeeling.rowTitles = rows
36 |
37 | //Add animations when feelings button tapped.
38 | //Pulse, Flash, Shake and None.
39 | viewFeeling.feelingsButtonAnimationType = .Flash
40 |
41 | //Default Feelings Value (from 1 up-to total columns count)
42 | viewFeeling.defaultFeeligns = 5
43 |
44 | //Customization Options
45 | //viewFeeling.backgroundColor = .red
46 |
47 | //viewFeeling.rowTitleColor = .white
48 | //viewFeeling.columnTitleColor = .white
49 |
50 | //viewFeeling.rowTitleFont = UIFont.init(name: "Verdana", size: 14.0)
51 | //viewFeeling.columnTitleFont = UIFont.init(name: "Helvetica", size: 14.0)
52 |
53 | //viewFeeling.rowTitleBackgroundColor = .red
54 | //viewFeeling.columnTitleBackgroundColor = .red
55 |
56 | //viewFeeling.feelingsButtonsBackgroundColor = .white
57 |
58 | //Reload
59 | viewFeeling.reloadFeelingView()
60 |
61 | //Detect selection of Feelings value
62 | viewFeeling.onFilledCompletion = { (row,column) in
63 | //Note: row and column are the Int which a user tapped in the FeelingsView
64 | let rowValue = rows[row]
65 | let columnValue = columns[column]
66 | print("\(rowValue) -> \(columnValue)")
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/Feelings/Feelings.xcodeproj/xcshareddata/xcschemes/Feelings.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/Feelings/Feelings/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | SnellRoundhand-Bold
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/swift,xcode,objective-c
3 |
4 | ### Objective-C ###
5 | # Xcode
6 | #
7 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
8 |
9 | ## Build generated
10 | build/
11 | DerivedData/
12 |
13 | ## Various settings
14 | *.pbxuser
15 | !default.pbxuser
16 | *.mode1v3
17 | !default.mode1v3
18 | *.mode2v3
19 | !default.mode2v3
20 | *.perspectivev3
21 | !default.perspectivev3
22 | xcuserdata/
23 |
24 | ## Other
25 | *.moved-aside
26 | *.xccheckout
27 | *.xcscmblueprint
28 |
29 | ## Obj-C/Swift specific
30 | *.hmap
31 | *.ipa
32 | *.dSYM.zip
33 | *.dSYM
34 |
35 | # CocoaPods - Refactored to standalone file
36 |
37 |
38 | # Carthage - Refactored to standalone file
39 |
40 | # fastlane
41 | #
42 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
43 | # screenshots whenever they are needed.
44 | # For more information about the recommended setup visit:
45 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
46 |
47 | fastlane/report.xml
48 | fastlane/Preview.html
49 | fastlane/screenshots
50 | fastlane/test_output
51 |
52 | # Code Injection
53 | #
54 | # After new code Injection tools there's a generated folder /iOSInjectionProject
55 | # https://github.com/johnno1962/injectionforxcode
56 |
57 | iOSInjectionProject/
58 |
59 | ### Objective-C Patch ###
60 |
61 | ### Objective-C.CocoaPods Stack ###
62 | ## CocoaPods GitIgnore Template
63 |
64 | # CocoaPods - Only use to conserve bandwidth / Save time on Pushing
65 | # - Also handy if you have a lage number of dependant pods
66 | # - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGONRE THE LOCK FILE
67 | Pods/
68 |
69 | ### Objective-C.Carthage Stack ###
70 | # Carthage
71 | #
72 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
73 | # Carthage/Checkouts
74 |
75 | Carthage/Build
76 |
77 | ### Swift ###
78 | # Xcode
79 | #
80 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
81 |
82 | ## Build generated
83 |
84 | ## Various settings
85 |
86 | ## Other
87 |
88 | ## Obj-C/Swift specific
89 |
90 | ## Playgrounds
91 | timeline.xctimeline
92 | playground.xcworkspace
93 |
94 | # Swift Package Manager
95 | #
96 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
97 | # Packages/
98 | # Package.pins
99 | .build/
100 |
101 | # CocoaPods - Refactored to standalone file
102 |
103 | # Carthage - Refactored to standalone file
104 |
105 | # fastlane
106 | #
107 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
108 | # screenshots whenever they are needed.
109 | # For more information about the recommended setup visit:
110 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
111 |
112 |
113 | ### Swift.Carthage Stack ###
114 | # Carthage
115 | #
116 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
117 | # Carthage/Checkouts
118 |
119 |
120 | ### Swift.CocoaPods Stack ###
121 | ## CocoaPods GitIgnore Template
122 |
123 | # CocoaPods - Only use to conserve bandwidth / Save time on Pushing
124 | # - Also handy if you have a lage number of dependant pods
125 | # - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGONRE THE LOCK FILE
126 |
127 | ### Xcode ###
128 | # Xcode
129 | #
130 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
131 |
132 | ## Build generated
133 |
134 | ## Various settings
135 |
136 | ## Other
137 |
138 | ### Xcode Patch ###
139 | *.xcodeproj/*
140 | !*.xcodeproj/project.pbxproj
141 | !*.xcodeproj/xcshareddata/
142 | !*.xcworkspace/contents.xcworkspacedata
143 | /*.gcno
144 |
145 | # End of https://www.gitignore.io/api/swift,xcode,objective-c
146 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Feelings 🎭
2 |
3 | Another rating view to share your **feelings**.
4 |
5 | 
6 | 
7 | 
8 | 
9 | 
10 | [](https://github.com/matteocrippa/awesome-swift/)
11 |
12 |
13 |
14 | ## Installation
15 |
16 | > **IMPORTANT**: You will need two images, one is filled and another is unfilled to represents feelings. See this sample images for the same, check it [here](https://github.com/hemangshah/Feelings/tree/master/Feelings/Feelings/Assets.xcassets).
17 |
18 | 1.**Manually** - Add `FeelingsView.swift` class to your Project. All set.
19 |
20 | 2.**CocoaPods**: `pod 'FeelingsView'`
21 |
22 | # Usage:
23 |
24 | ### Create Programmatically.
25 |
26 | ````swift
27 | //Create Sample Arrays
28 | let rows = ["Quality","Price","Value"]
29 | let columns = ["1 Star","2 Star","3 Star","4 Star","5 Star"]
30 |
31 | //Create FeelingsView
32 | //Note: You should provide two images for FeelingsView. 1. Filled and 2. Unfilled
33 | let viewFeeling = FeelingsView.init(frame: CGRect.init(x: 0.0, y: 0.0, width: 300.0, height: 200.0))
34 | viewFeeling.backgroundColor = UIColor.clear
35 | viewFeeling.autoresizingMask = [.flexibleLeftMargin, .flexibleRightMargin, .flexibleTopMargin, .flexibleBottomMargin]
36 | self.view.addSubview(viewFeeling)
37 | viewFeeling.center = self.view.center
38 |
39 | //Setting fill/unfill images for FeelingsView
40 | viewFeeling.fillImage = UIImage.init(named: "filled.png")!
41 | viewFeeling.unfillImage = UIImage.init(named: "unfilled.png")!
42 |
43 | //Setting up values for Feelings
44 | viewFeeling.columnTitles = columns
45 | viewFeeling.rowTitles = rows
46 |
47 | //Reload
48 | viewFeeling.reloadFeelingView()
49 |
50 | //Detect selection of Feelings value
51 | viewFeeling.onFilledCompletion = { (row,column) in
52 | //Note: row and column are the Int which a user tapped in the FeelingsView
53 | let rowValue = rows[row]
54 | let columnValue = columns[column]
55 | print("\(rowValue) -> \(columnValue)")
56 | }
57 | ````
58 |
59 | > **IMPORTANT**: For customizations see the [example](https://github.com/hemangshah/Feelings/blob/master/Feelings/Feelings/ViewController.swift).
60 |
61 | ### Create in Storyboard/XIB.
62 |
63 | 1. Add a `UIView`. Set require size. Add constraints if requires.
64 |
65 | 2. Change class type from `UIView` to `FeelingsView`.
66 |
67 |
68 | 3. Apply the properties for `FeelingsView`.
69 |
70 |
71 | 4. Create an `IBOutlet` for `FeelingsView`. Bind it in `IBInspector`.
72 |
73 | 5. In `viewDidLoad` or at anyplace where you want provide rows and columns titles.
74 |
75 | 6. Reload `FeelingsView` by calling `reloadFeelingView` function.
76 |
77 | 7. Detect the taps on `FeelingsView` by implementing `onFilledCompletion` closure block.
78 |
79 | # ToDo[s]
80 |
81 | - [x] CocoaPods support
82 |
83 | You can [watch](https://github.com/hemangshah/Feelings/subscription) to **Feelings** to see continuous updates. Stay tuned.
84 |
85 | Have an idea for improvements of this class?
86 | Please open an [issue](https://github.com/hemangshah/Feelings/issues/new).
87 |
88 | ## Credits
89 |
90 | [Hemang Shah](https://about.me/hemang.shah)
91 |
92 | **You can shoot me an [email](http://www.google.com/recaptcha/mailhide/d?k=01IzGihUsyfigse2G9z80rBw==&c=vU7vyAaau8BctOAIJFwHVbKfgtIqQ4QLJaL73yhnB3k=) to contact.**
93 |
94 | ## License
95 |
96 | The MIT License (MIT)
97 |
98 | > Read the [LICENSE](https://github.com/hemangshah/Feelings/blob/master/LICENSE) file for details.
99 |
--------------------------------------------------------------------------------
/Feelings/Feelings/Source/FeelingsView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FeelingsView.swift
3 | // Feelings
4 | //
5 | // Created by Hemang Shah on 6/14/17.
6 | // Copyright © 2017 Hemang Shah. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | //Credits for the Animation: [SeanAllen] https://gist.github.com/SAllen0400/a09754049fcdcc00695291b3a011fbbd
12 |
13 | fileprivate extension UIButton {
14 |
15 | func pulsate() {
16 |
17 | let pulse = CASpringAnimation(keyPath: "transform.scale")
18 | pulse.duration = 0.2
19 | pulse.fromValue = 0.95
20 | pulse.toValue = 1.0
21 | pulse.autoreverses = true
22 | pulse.repeatCount = 2
23 | pulse.initialVelocity = 0.5
24 | pulse.damping = 1.0
25 |
26 | layer.add(pulse, forKey: "pulse")
27 | }
28 |
29 | func flash() {
30 |
31 | let flash = CABasicAnimation(keyPath: "opacity")
32 | flash.duration = 0.2
33 | flash.fromValue = 1
34 | flash.toValue = 0.1
35 | flash.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
36 | flash.autoreverses = true
37 | flash.repeatCount = 3
38 |
39 | layer.add(flash, forKey: nil)
40 | }
41 |
42 |
43 | func shake() {
44 |
45 | let shake = CABasicAnimation(keyPath: "position")
46 | shake.duration = 0.05
47 | shake.repeatCount = 2
48 | shake.autoreverses = true
49 |
50 | let fromPoint = CGPoint(x: center.x - 5, y: center.y)
51 | let fromValue = NSValue(cgPoint: fromPoint)
52 |
53 | let toPoint = CGPoint(x: center.x + 5, y: center.y)
54 | let toValue = NSValue(cgPoint: toPoint)
55 |
56 | shake.fromValue = fromValue
57 | shake.toValue = toValue
58 |
59 | layer.add(shake, forKey: "position")
60 | }
61 | }
62 |
63 | //You can change this value accordingly and it will update the entire FeelingsView
64 | fileprivate let leftMarginForRows = 50.0
65 | fileprivate let topMarginForColumns = 50.0
66 |
67 | public enum FeelingsViewButtonTapAnimationType: Int {
68 | case None
69 | case Pulse
70 | case Flash
71 | case Shake
72 | }
73 |
74 | @IBDesignable
75 | public class FeelingsView : UIView {
76 |
77 | ///columnTitles of Type Array
78 | public var columnTitles = Array()
79 | ///rowTitles of Type Array
80 | public var rowTitles = Array()
81 | ///Animation Type for the Feelings Button Taps.
82 | public var feelingsButtonAnimationType: FeelingsViewButtonTapAnimationType = .None
83 | ///Default Feelings Value.
84 | public var defaultFeeligns:Int = -1
85 |
86 | //Fonts
87 | @IBInspectable public var rowTitleFont:UIFont?
88 | @IBInspectable public var columnTitleFont:UIFont?
89 |
90 | //Colors
91 | @IBInspectable public var rowTitleColor:UIColor?
92 | @IBInspectable public var columnTitleColor:UIColor?
93 |
94 | //Background Colors
95 | @IBInspectable public var rowTitleBackgroundColor:UIColor?
96 | @IBInspectable public var columnTitleBackgroundColor:UIColor?
97 | @IBInspectable public var feelingsButtonsBackgroundColor:UIColor?
98 |
99 | //fill Image (Uses to show radio button selection)
100 | @IBInspectable public var fillImage:UIImage? = nil
101 | //unfillImage Image (Uses to show radio button not selected)
102 | @IBInspectable public var unfillImage:UIImage? = nil
103 |
104 | //Completion Block to Detect selection of Feelings value (row,column).
105 | public var onFilledCompletion:((_ row:Int, _ column:Int) -> ())? = nil
106 |
107 | //MARK:Init
108 | public override init(frame: CGRect) {
109 | super.init(frame: frame)
110 | //By default, you can customize it to your wish.
111 | self.backgroundColor = .clear
112 | }
113 |
114 | required public init?(coder aDecoder: NSCoder) {
115 | super.init(coder: aDecoder)
116 | }
117 |
118 | //MARK: Create Rows/Columns/Feelings
119 | fileprivate func createRows() -> Void {
120 | let rowLabelPointX:Double = 0.0
121 | var rowLabelPointY:Double = topMarginForColumns
122 | let feelingsViewHeight:Double = Double(self.frame.height)
123 | let dynamicHeight = (feelingsViewHeight - topMarginForColumns) / Double(rowTitles.count)
124 |
125 | for index in 0.. Void {
143 | var columnLabelPointX:Double = leftMarginForRows
144 | let columnLabelPointY:Double = 0.0
145 | let feelingsViewWidth:Double = Double(self.frame.width)
146 | let dynamicWidth = (feelingsViewWidth - leftMarginForRows) / Double(columnTitles.count)
147 |
148 | for index in 0.. Void {
166 | var feelingsViewPointX:Double = leftMarginForRows
167 | var feelingsViewPointY:Double = topMarginForColumns
168 | let feelingsViewWidth:Double = Double(self.frame.width)
169 | let dynamicWidth = (feelingsViewWidth - leftMarginForRows) / Double(columnTitles.count)
170 |
171 | for rowIndex in 0..= 1 && defaultFeeligns <= columnTitles.count {
193 | if defaultFeeligns == (columnIndex + 1) {
194 | actionFeelingsTapped(button: feelingsButton)
195 | }
196 | }
197 | }
198 | feelingsViewPointX = leftMarginForRows
199 | feelingsViewPointY = feelingsViewPointY + topMarginForColumns
200 | }
201 | }
202 |
203 | //MARK: Actions
204 | @objc fileprivate func actionFeelingsTapped(button:UIButton) -> Void {
205 | if feelingsButtonAnimationType != .None {
206 | if feelingsButtonAnimationType == .Pulse {
207 | button.pulsate()
208 | } else if feelingsButtonAnimationType == .Flash {
209 | button.flash()
210 | } else if feelingsButtonAnimationType == .Shake {
211 | button.shake()
212 | }
213 | }
214 |
215 | let rowView = button.superview!
216 | unFilledEveryOneInRow(button: button, withRowView: rowView)
217 | button.isSelected = !button.isSelected
218 | button.isUserInteractionEnabled = !button.isUserInteractionEnabled
219 | if onFilledCompletion != nil {
220 | onFilledCompletion!(rowView.tag-1, button.tag-1)
221 | }
222 | }
223 |
224 | //MARK: Helpers
225 | fileprivate func unFilledEveryOneInRow(button:UIButton, withRowView rowView:UIView) -> Void {
226 | for case let feelingsButton as UIButton in rowView.subviews {
227 | feelingsButton.isSelected = false
228 | feelingsButton.isUserInteractionEnabled = true
229 | }
230 | }
231 |
232 | //MARK: Create Label
233 | fileprivate func createLabel(withFrame frame:CGRect, text:String, font:UIFont, textColor:UIColor, textAlignment:NSTextAlignment) -> UILabel {
234 | let label = UILabel.init(frame: frame)
235 | label.backgroundColor = UIColor.clear
236 | label.text = text
237 | label.font = font
238 | label.textColor = textColor
239 | label.textAlignment = textAlignment
240 | label.minimumScaleFactor = (UIFont.labelFontSize/2)/UIFont.labelFontSize
241 | label.adjustsFontSizeToFitWidth = true
242 | return label
243 | }
244 |
245 | //MARK: Reload Feelings View
246 | ///FeelingsView should be reload after setting rows and columns titles.
247 | public func reloadFeelingView() -> Void {
248 | guard fillImage != nil || unfillImage != nil else {
249 | print("You forgot to provide fillImage or unfillImage.")
250 | return
251 | }
252 |
253 | guard rowTitles.count > 0 && columnTitles.count > 0 else {
254 | print("You forgot to provide rowTitles or columnTitles values.")
255 | return
256 | }
257 | createRows()
258 | createColumns()
259 | createFeelings()
260 | }
261 | }
262 |
--------------------------------------------------------------------------------
/Feelings/Feelings.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 48;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | F13F7BE11F0DFA3B00DF79FC /* FeelingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F13F7BE01F0DFA2A00DF79FC /* FeelingsView.swift */; };
11 | F1E961641EF11B49002A31B1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1E961631EF11B49002A31B1 /* AppDelegate.swift */; };
12 | F1E961661EF11B49002A31B1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1E961651EF11B49002A31B1 /* ViewController.swift */; };
13 | F1E961691EF11B49002A31B1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F1E961671EF11B49002A31B1 /* Main.storyboard */; };
14 | F1E9616B1EF11B49002A31B1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F1E9616A1EF11B49002A31B1 /* Assets.xcassets */; };
15 | F1E9616E1EF11B49002A31B1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F1E9616C1EF11B49002A31B1 /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXFileReference section */
19 | F13F7BE01F0DFA2A00DF79FC /* FeelingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeelingsView.swift; sourceTree = ""; };
20 | F1E961601EF11B49002A31B1 /* Feelings.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Feelings.app; sourceTree = BUILT_PRODUCTS_DIR; };
21 | F1E961631EF11B49002A31B1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
22 | F1E961651EF11B49002A31B1 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
23 | F1E961681EF11B49002A31B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
24 | F1E9616A1EF11B49002A31B1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
25 | F1E9616D1EF11B49002A31B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
26 | F1E9616F1EF11B49002A31B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
27 | /* End PBXFileReference section */
28 |
29 | /* Begin PBXFrameworksBuildPhase section */
30 | F1E9615D1EF11B49002A31B1 /* Frameworks */ = {
31 | isa = PBXFrameworksBuildPhase;
32 | buildActionMask = 2147483647;
33 | files = (
34 | );
35 | runOnlyForDeploymentPostprocessing = 0;
36 | };
37 | /* End PBXFrameworksBuildPhase section */
38 |
39 | /* Begin PBXGroup section */
40 | F13F7BDF1F0DFA2A00DF79FC /* Source */ = {
41 | isa = PBXGroup;
42 | children = (
43 | F13F7BE01F0DFA2A00DF79FC /* FeelingsView.swift */,
44 | );
45 | path = Source;
46 | sourceTree = "";
47 | };
48 | F1E961571EF11B49002A31B1 = {
49 | isa = PBXGroup;
50 | children = (
51 | F1E961621EF11B49002A31B1 /* Feelings */,
52 | F1E961611EF11B49002A31B1 /* Products */,
53 | );
54 | sourceTree = "";
55 | };
56 | F1E961611EF11B49002A31B1 /* Products */ = {
57 | isa = PBXGroup;
58 | children = (
59 | F1E961601EF11B49002A31B1 /* Feelings.app */,
60 | );
61 | name = Products;
62 | sourceTree = "";
63 | };
64 | F1E961621EF11B49002A31B1 /* Feelings */ = {
65 | isa = PBXGroup;
66 | children = (
67 | F13F7BDF1F0DFA2A00DF79FC /* Source */,
68 | F1E961631EF11B49002A31B1 /* AppDelegate.swift */,
69 | F1E961651EF11B49002A31B1 /* ViewController.swift */,
70 | F1E961671EF11B49002A31B1 /* Main.storyboard */,
71 | F1E9616A1EF11B49002A31B1 /* Assets.xcassets */,
72 | F1E9616C1EF11B49002A31B1 /* LaunchScreen.storyboard */,
73 | F1E9616F1EF11B49002A31B1 /* Info.plist */,
74 | );
75 | path = Feelings;
76 | sourceTree = "";
77 | };
78 | /* End PBXGroup section */
79 |
80 | /* Begin PBXNativeTarget section */
81 | F1E9615F1EF11B49002A31B1 /* Feelings */ = {
82 | isa = PBXNativeTarget;
83 | buildConfigurationList = F1E961721EF11B49002A31B1 /* Build configuration list for PBXNativeTarget "Feelings" */;
84 | buildPhases = (
85 | F1E9615C1EF11B49002A31B1 /* Sources */,
86 | F1E9615D1EF11B49002A31B1 /* Frameworks */,
87 | F1E9615E1EF11B49002A31B1 /* Resources */,
88 | );
89 | buildRules = (
90 | );
91 | dependencies = (
92 | );
93 | name = Feelings;
94 | productName = Feelings;
95 | productReference = F1E961601EF11B49002A31B1 /* Feelings.app */;
96 | productType = "com.apple.product-type.application";
97 | };
98 | /* End PBXNativeTarget section */
99 |
100 | /* Begin PBXProject section */
101 | F1E961581EF11B49002A31B1 /* Project object */ = {
102 | isa = PBXProject;
103 | attributes = {
104 | LastSwiftUpdateCheck = 0900;
105 | LastUpgradeCheck = 0900;
106 | ORGANIZATIONNAME = "Hemang Shah";
107 | TargetAttributes = {
108 | F1E9615F1EF11B49002A31B1 = {
109 | CreatedOnToolsVersion = 9.0;
110 | LastSwiftMigration = 0900;
111 | };
112 | };
113 | };
114 | buildConfigurationList = F1E9615B1EF11B49002A31B1 /* Build configuration list for PBXProject "Feelings" */;
115 | compatibilityVersion = "Xcode 8.0";
116 | developmentRegion = en;
117 | hasScannedForEncodings = 0;
118 | knownRegions = (
119 | en,
120 | Base,
121 | );
122 | mainGroup = F1E961571EF11B49002A31B1;
123 | productRefGroup = F1E961611EF11B49002A31B1 /* Products */;
124 | projectDirPath = "";
125 | projectRoot = "";
126 | targets = (
127 | F1E9615F1EF11B49002A31B1 /* Feelings */,
128 | );
129 | };
130 | /* End PBXProject section */
131 |
132 | /* Begin PBXResourcesBuildPhase section */
133 | F1E9615E1EF11B49002A31B1 /* Resources */ = {
134 | isa = PBXResourcesBuildPhase;
135 | buildActionMask = 2147483647;
136 | files = (
137 | F1E9616E1EF11B49002A31B1 /* LaunchScreen.storyboard in Resources */,
138 | F1E9616B1EF11B49002A31B1 /* Assets.xcassets in Resources */,
139 | F1E961691EF11B49002A31B1 /* Main.storyboard in Resources */,
140 | );
141 | runOnlyForDeploymentPostprocessing = 0;
142 | };
143 | /* End PBXResourcesBuildPhase section */
144 |
145 | /* Begin PBXSourcesBuildPhase section */
146 | F1E9615C1EF11B49002A31B1 /* Sources */ = {
147 | isa = PBXSourcesBuildPhase;
148 | buildActionMask = 2147483647;
149 | files = (
150 | F13F7BE11F0DFA3B00DF79FC /* FeelingsView.swift in Sources */,
151 | F1E961661EF11B49002A31B1 /* ViewController.swift in Sources */,
152 | F1E961641EF11B49002A31B1 /* AppDelegate.swift in Sources */,
153 | );
154 | runOnlyForDeploymentPostprocessing = 0;
155 | };
156 | /* End PBXSourcesBuildPhase section */
157 |
158 | /* Begin PBXVariantGroup section */
159 | F1E961671EF11B49002A31B1 /* Main.storyboard */ = {
160 | isa = PBXVariantGroup;
161 | children = (
162 | F1E961681EF11B49002A31B1 /* Base */,
163 | );
164 | name = Main.storyboard;
165 | sourceTree = "";
166 | };
167 | F1E9616C1EF11B49002A31B1 /* LaunchScreen.storyboard */ = {
168 | isa = PBXVariantGroup;
169 | children = (
170 | F1E9616D1EF11B49002A31B1 /* Base */,
171 | );
172 | name = LaunchScreen.storyboard;
173 | sourceTree = "";
174 | };
175 | /* End PBXVariantGroup section */
176 |
177 | /* Begin XCBuildConfiguration section */
178 | F1E961701EF11B49002A31B1 /* Debug */ = {
179 | isa = XCBuildConfiguration;
180 | buildSettings = {
181 | ALWAYS_SEARCH_USER_PATHS = NO;
182 | CLANG_ANALYZER_NONNULL = YES;
183 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
184 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
185 | CLANG_CXX_LIBRARY = "libc++";
186 | CLANG_ENABLE_MODULES = YES;
187 | CLANG_ENABLE_OBJC_ARC = YES;
188 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
189 | CLANG_WARN_BOOL_CONVERSION = YES;
190 | CLANG_WARN_COMMA = YES;
191 | CLANG_WARN_CONSTANT_CONVERSION = YES;
192 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
193 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
194 | CLANG_WARN_EMPTY_BODY = YES;
195 | CLANG_WARN_ENUM_CONVERSION = YES;
196 | CLANG_WARN_INFINITE_RECURSION = YES;
197 | CLANG_WARN_INT_CONVERSION = YES;
198 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
199 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
200 | CLANG_WARN_STRICT_PROTOTYPES = YES;
201 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
202 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
203 | CLANG_WARN_UNREACHABLE_CODE = YES;
204 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
205 | CODE_SIGN_IDENTITY = "iPhone Developer";
206 | COPY_PHASE_STRIP = NO;
207 | DEBUG_INFORMATION_FORMAT = dwarf;
208 | ENABLE_STRICT_OBJC_MSGSEND = YES;
209 | ENABLE_TESTABILITY = YES;
210 | GCC_C_LANGUAGE_STANDARD = gnu11;
211 | GCC_DYNAMIC_NO_PIC = NO;
212 | GCC_NO_COMMON_BLOCKS = YES;
213 | GCC_OPTIMIZATION_LEVEL = 0;
214 | GCC_PREPROCESSOR_DEFINITIONS = (
215 | "DEBUG=1",
216 | "$(inherited)",
217 | );
218 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
219 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
220 | GCC_WARN_UNDECLARED_SELECTOR = YES;
221 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
222 | GCC_WARN_UNUSED_FUNCTION = YES;
223 | GCC_WARN_UNUSED_VARIABLE = YES;
224 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
225 | MTL_ENABLE_DEBUG_INFO = YES;
226 | ONLY_ACTIVE_ARCH = YES;
227 | SDKROOT = iphoneos;
228 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
229 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
230 | };
231 | name = Debug;
232 | };
233 | F1E961711EF11B49002A31B1 /* Release */ = {
234 | isa = XCBuildConfiguration;
235 | buildSettings = {
236 | ALWAYS_SEARCH_USER_PATHS = NO;
237 | CLANG_ANALYZER_NONNULL = YES;
238 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
240 | CLANG_CXX_LIBRARY = "libc++";
241 | CLANG_ENABLE_MODULES = YES;
242 | CLANG_ENABLE_OBJC_ARC = YES;
243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
244 | CLANG_WARN_BOOL_CONVERSION = YES;
245 | CLANG_WARN_COMMA = YES;
246 | CLANG_WARN_CONSTANT_CONVERSION = YES;
247 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
248 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INFINITE_RECURSION = YES;
252 | CLANG_WARN_INT_CONVERSION = YES;
253 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
254 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
255 | CLANG_WARN_STRICT_PROTOTYPES = YES;
256 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
257 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
258 | CLANG_WARN_UNREACHABLE_CODE = YES;
259 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
260 | CODE_SIGN_IDENTITY = "iPhone Developer";
261 | COPY_PHASE_STRIP = NO;
262 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
263 | ENABLE_NS_ASSERTIONS = NO;
264 | ENABLE_STRICT_OBJC_MSGSEND = YES;
265 | GCC_C_LANGUAGE_STANDARD = gnu11;
266 | GCC_NO_COMMON_BLOCKS = YES;
267 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
268 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
269 | GCC_WARN_UNDECLARED_SELECTOR = YES;
270 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
271 | GCC_WARN_UNUSED_FUNCTION = YES;
272 | GCC_WARN_UNUSED_VARIABLE = YES;
273 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
274 | MTL_ENABLE_DEBUG_INFO = NO;
275 | SDKROOT = iphoneos;
276 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
277 | VALIDATE_PRODUCT = YES;
278 | };
279 | name = Release;
280 | };
281 | F1E961731EF11B49002A31B1 /* Debug */ = {
282 | isa = XCBuildConfiguration;
283 | buildSettings = {
284 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
285 | INFOPLIST_FILE = Feelings/Info.plist;
286 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
287 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
288 | PRODUCT_BUNDLE_IDENTIFIER = com.hemangshah.Feelings;
289 | PRODUCT_NAME = "$(TARGET_NAME)";
290 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
291 | SWIFT_VERSION = 4.0;
292 | TARGETED_DEVICE_FAMILY = "1,2";
293 | };
294 | name = Debug;
295 | };
296 | F1E961741EF11B49002A31B1 /* Release */ = {
297 | isa = XCBuildConfiguration;
298 | buildSettings = {
299 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
300 | INFOPLIST_FILE = Feelings/Info.plist;
301 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
302 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
303 | PRODUCT_BUNDLE_IDENTIFIER = com.hemangshah.Feelings;
304 | PRODUCT_NAME = "$(TARGET_NAME)";
305 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
306 | SWIFT_VERSION = 4.0;
307 | TARGETED_DEVICE_FAMILY = "1,2";
308 | };
309 | name = Release;
310 | };
311 | /* End XCBuildConfiguration section */
312 |
313 | /* Begin XCConfigurationList section */
314 | F1E9615B1EF11B49002A31B1 /* Build configuration list for PBXProject "Feelings" */ = {
315 | isa = XCConfigurationList;
316 | buildConfigurations = (
317 | F1E961701EF11B49002A31B1 /* Debug */,
318 | F1E961711EF11B49002A31B1 /* Release */,
319 | );
320 | defaultConfigurationIsVisible = 0;
321 | defaultConfigurationName = Release;
322 | };
323 | F1E961721EF11B49002A31B1 /* Build configuration list for PBXNativeTarget "Feelings" */ = {
324 | isa = XCConfigurationList;
325 | buildConfigurations = (
326 | F1E961731EF11B49002A31B1 /* Debug */,
327 | F1E961741EF11B49002A31B1 /* Release */,
328 | );
329 | defaultConfigurationIsVisible = 0;
330 | defaultConfigurationName = Release;
331 | };
332 | /* End XCConfigurationList section */
333 | };
334 | rootObject = F1E961581EF11B49002A31B1 /* Project object */;
335 | }
336 |
--------------------------------------------------------------------------------