├── .DS_Store
├── ImageSlider-Swift
├── next.png
├── previous.png
├── wallpaper-hd-3151.jpg
├── Black-Car-HD-Wallpaper.jpg
├── lamborghini_murcielago_superveloce_2-2880x1800.jpg
├── nature-landscape-photography-lanscape-cool-hd-wallpapers-fullscreen-high-resolution.jpg
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── Base.lproj
│ └── LaunchScreen.storyboard
├── SBPhotoManager.swift
├── FirstViewController.swift
├── AppDelegate.swift
├── SBSliderView.xib
├── SBPhotoViewController.xib
├── SBPhotoViewController.swift
├── FirstViewController.xib
└── SBSliderView.swift
└── ImageSlider-Swift.xcodeproj
├── project.xcworkspace
├── contents.xcworkspacedata
└── xcuserdata
│ └── VamshiKrishna.xcuserdatad
│ └── UserInterfaceState.xcuserstate
├── xcuserdata
└── VamshiKrishna.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ ├── xcschememanagement.plist
│ └── ImageSlider-Swift.xcscheme
└── project.pbxproj
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VamshiIITBHU14/ImageSlider-Swift/HEAD/.DS_Store
--------------------------------------------------------------------------------
/ImageSlider-Swift/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VamshiIITBHU14/ImageSlider-Swift/HEAD/ImageSlider-Swift/next.png
--------------------------------------------------------------------------------
/ImageSlider-Swift/previous.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VamshiIITBHU14/ImageSlider-Swift/HEAD/ImageSlider-Swift/previous.png
--------------------------------------------------------------------------------
/ImageSlider-Swift/wallpaper-hd-3151.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VamshiIITBHU14/ImageSlider-Swift/HEAD/ImageSlider-Swift/wallpaper-hd-3151.jpg
--------------------------------------------------------------------------------
/ImageSlider-Swift/Black-Car-HD-Wallpaper.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VamshiIITBHU14/ImageSlider-Swift/HEAD/ImageSlider-Swift/Black-Car-HD-Wallpaper.jpg
--------------------------------------------------------------------------------
/ImageSlider-Swift/lamborghini_murcielago_superveloce_2-2880x1800.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VamshiIITBHU14/ImageSlider-Swift/HEAD/ImageSlider-Swift/lamborghini_murcielago_superveloce_2-2880x1800.jpg
--------------------------------------------------------------------------------
/ImageSlider-Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ImageSlider-Swift/nature-landscape-photography-lanscape-cool-hd-wallpapers-fullscreen-high-resolution.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VamshiIITBHU14/ImageSlider-Swift/HEAD/ImageSlider-Swift/nature-landscape-photography-lanscape-cool-hd-wallpapers-fullscreen-high-resolution.jpg
--------------------------------------------------------------------------------
/ImageSlider-Swift.xcodeproj/project.xcworkspace/xcuserdata/VamshiKrishna.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VamshiIITBHU14/ImageSlider-Swift/HEAD/ImageSlider-Swift.xcodeproj/project.xcworkspace/xcuserdata/VamshiKrishna.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ImageSlider-Swift.xcodeproj/xcuserdata/VamshiKrishna.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ImageSlider-Swift.xcodeproj/xcuserdata/VamshiKrishna.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ImageSlider-Swift.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 969369BB1E7E80FA00018988
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ImageSlider-Swift/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 | "info" : {
45 | "version" : 1,
46 | "author" : "xcode"
47 | }
48 | }
--------------------------------------------------------------------------------
/ImageSlider-Swift/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIRequiredDeviceCapabilities
26 |
27 | armv7
28 |
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/ImageSlider-Swift/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 |
--------------------------------------------------------------------------------
/ImageSlider-Swift/SBPhotoManager.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SBPhotoManager.swift
3 | // ImageSlider-Swift
4 | //
5 | // Created by Vamshi Krishna on 24/03/17.
6 | // Copyright © 2017 VamshiKrishna. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class SBPhotoManager: NSObject {
12 |
13 | func initializePhotoViewer(fromViewControlller fromViewController: Any, forTargetImageView targetImageView: UIImageView, withPosition startPosition: CGRect) {
14 |
15 | let appDel: AppDelegate? = (UIApplication.shared.delegate as? AppDelegate)
16 | if (fromViewController is UIViewController) {
17 | var backgroundImage: UIImage? = nil
18 | let targetViewController: UIViewController? = (fromViewController as? UIViewController)
19 | let scale = "scale"
20 | if UIScreen.main.responds(to: Selector(scale)) {
21 | UIGraphicsBeginImageContextWithOptions((appDel?.window?.bounds.size)!, false, UIScreen.main.scale)
22 | }
23 | else {
24 | UIGraphicsBeginImageContext((appDel?.window?.bounds.size)!)
25 | }
26 | appDel?.window?.layer.render(in: UIGraphicsGetCurrentContext()!)
27 | let image: UIImage? = UIGraphicsGetImageFromCurrentImageContext()
28 | UIGraphicsEndImageContext()
29 | let imgData: Data? = UIImagePNGRepresentation(image!)
30 | if imgData != nil {
31 | backgroundImage = UIImage(data: imgData!)
32 | }
33 | else {
34 | print("error while taking screenshot")
35 | }
36 |
37 | let photoViewer = SBPhotoViewController(nibName: "SBPhotoViewController", bundle: nil)
38 | photoViewer.targetImage = targetImageView.image
39 | photoViewer.initialRect = startPosition
40 | photoViewer.backGroundImage = backgroundImage
41 | targetViewController?.navigationController?.pushViewController(photoViewer, animated: false)
42 |
43 | }
44 | else{
45 | //UIAlert
46 | }
47 |
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/ImageSlider-Swift/FirstViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FirstViewController.swift
3 | // ImageSlider-Swift
4 | //
5 | // Created by Vamshi Krishna on 24/03/17.
6 | // Copyright © 2017 VamshiKrishna. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | let _AUTO_SCROLL_ENABLED:Bool = false
11 |
12 | class FirstViewController: UIViewController, SBSliderDelegate {
13 | @IBOutlet var autoPlayToggle: UISwitch!
14 | @IBOutlet var sampleImageView: UIImageView!
15 | var imagesArray = [Any]()
16 | var slider : SBSliderView?
17 |
18 | override func viewDidLoad() {
19 | super.viewDidLoad()
20 |
21 | imagesArray = ["Black-Car-HD-Wallpaper.jpg", "lamborghini_murcielago_superveloce_2-2880x1800.jpg", "nature-landscape-photography-lanscape-cool-hd-wallpapers-fullscreen-high-resolution.jpg", "wallpaper-hd-3151.jpg"]
22 | autoPlayToggle.isOn = _AUTO_SCROLL_ENABLED
23 | slider = Bundle.main.loadNibNamed("SBSliderView", owner: self, options: nil)?.first as! SBSliderView?
24 | slider?.delegate = self
25 | self.view.addSubview(slider!)
26 | slider?.createSlider(withImages: imagesArray, withAutoScroll: _AUTO_SCROLL_ENABLED, in: self.view)
27 | slider?.frame = CGRect(x: CGFloat(0), y: CGFloat(100), width: CGFloat(UIScreen.main.bounds.size.width), height: CGFloat(300.0))
28 | }
29 |
30 |
31 | func sbslider(_ sbslider: SBSliderView, didTapOn targetImage: UIImage, andParentView targetView: UIImageView) {
32 | let photoViewerManager = SBPhotoManager()
33 | photoViewerManager.initializePhotoViewer(fromViewControlller: self, forTargetImageView: targetView, withPosition: sbslider.frame)
34 | }
35 |
36 |
37 | @IBAction func tappedOnSampleImage(_ sender: Any) {
38 | let gesture: UIGestureRecognizer? = (sender as? UIGestureRecognizer)
39 | let targetView: UIImageView? = (gesture?.view as? UIImageView)
40 | let photoViewerManager = SBPhotoManager()
41 | photoViewerManager.initializePhotoViewer(fromViewControlller: self, forTargetImageView: targetView!, withPosition: (targetView?.frame)!)
42 |
43 | }
44 | @IBAction func toggleAutoPlay(_ sender: Any) {
45 | let toggleSwitch: UISwitch? = (sender as? UISwitch)
46 | if (toggleSwitch?.isOn)! {
47 | slider?.startAutoPlay()
48 | }
49 | else {
50 | slider?.stopAutoPlay()
51 | }
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/ImageSlider-Swift/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // ImageSlider-Swift
4 | //
5 | // Created by Vamshi Krishna on 19/03/17.
6 | // Copyright © 2017 VamshiKrishna. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 | var navigationController: UINavigationController?
16 |
17 |
18 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
19 |
20 | let firstView = FirstViewController()
21 | navigationController = UINavigationController(rootViewController: firstView)
22 | window = UIWindow(frame: UIScreen.main.bounds)
23 | window?.rootViewController = navigationController
24 | window?.makeKeyAndVisible()
25 | return true
26 | }
27 |
28 | func applicationWillResignActive(_ application: UIApplication) {
29 | // 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.
30 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
31 | }
32 |
33 | func applicationDidEnterBackground(_ application: UIApplication) {
34 | // 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.
35 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
36 | }
37 |
38 | func applicationWillEnterForeground(_ application: UIApplication) {
39 | // 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.
40 | }
41 |
42 | func applicationDidBecomeActive(_ application: UIApplication) {
43 | // 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.
44 | }
45 |
46 | func applicationWillTerminate(_ application: UIApplication) {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 |
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/ImageSlider-Swift/SBSliderView.xib:
--------------------------------------------------------------------------------
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 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/ImageSlider-Swift/SBPhotoViewController.xib:
--------------------------------------------------------------------------------
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 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/ImageSlider-Swift.xcodeproj/xcuserdata/VamshiKrishna.xcuserdatad/xcschemes/ImageSlider-Swift.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 |
--------------------------------------------------------------------------------
/ImageSlider-Swift/SBPhotoViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SBPhotoViewController.swift
3 | // ImageSlider-Swift
4 | //
5 | // Created by Vamshi Krishna on 20/03/17.
6 | // Copyright © 2017 VamshiKrishna. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | let kMinBlackMaskAlpha: CGFloat = 0.1
12 |
13 | class SBPhotoViewController: UIViewController {
14 |
15 | var initialRect = CGRect.zero
16 | var targetImage: UIImage!
17 | var backGroundImage: UIImage!
18 | @IBOutlet weak var maskView: UIView!
19 | @IBOutlet weak var backGroundImageView: UIImageView!
20 |
21 | var mainImageView: UIImageView!
22 | var _finalRect: CGRect!
23 |
24 |
25 | override func viewDidLoad() {
26 | super.viewDidLoad()
27 | self .setupBackGround()
28 | self .setUpImageViewer()
29 | }
30 |
31 | func setupBackGround(){
32 | backGroundImageView.image = backGroundImage
33 | backGroundImageView.contentMode = .scaleAspectFill
34 | backGroundImageView.clipsToBounds = true
35 | }
36 |
37 | func setUpImageViewer(){
38 | mainImageView = UIImageView(frame: initialRect)
39 | mainImageView.contentMode = .scaleAspectFill
40 | mainImageView.image = targetImage
41 | mainImageView.clipsToBounds = true
42 | self.view.addSubview(mainImageView)
43 |
44 |
45 | var mainImageViewFrame: CGRect = self .getFullSizeFrameWithView(targetImageView: mainImageView)
46 | let targetY: CGFloat? = (((mainImageView.superview?.frame.size.height)! - mainImageViewFrame.size.height) / 2.0)
47 |
48 | UIView.animate(withDuration: 0.5, animations: {(_: Void) -> Void in
49 | self.maskView.alpha = 1.0
50 | mainImageViewFrame.origin.x = 0.0
51 | mainImageViewFrame.origin.y = targetY!
52 | self.mainImageView.frame = mainImageViewFrame
53 | }, completion: {(_ finished: Bool) -> Void in
54 | self.setupGesture()
55 | self._finalRect = mainImageViewFrame
56 | })
57 | }
58 |
59 | func getFullSizeFrameWithView(targetImageView:UIImageView) -> CGRect{
60 | let tempImage: UIImage? = targetImageView.image
61 | let imageFrame: CGSize? = tempImage?.size
62 | var finalFullFrame: CGRect = targetImageView.frame
63 |
64 |
65 | if (imageFrame?.width)! > (imageFrame?.height)! {
66 | finalFullFrame.size.width = UIScreen.main.bounds.size.width
67 | let multiplier: CGFloat = imageFrame!.width / imageFrame!.height
68 | finalFullFrame.size.height = finalFullFrame.size.width / multiplier
69 | }
70 |
71 | else if ((imageFrame?.height)! > (imageFrame?.width)!) {
72 | finalFullFrame.size.height = UIScreen.main.bounds.size.width
73 | let multiplier: CGFloat = imageFrame!.width / imageFrame!.height
74 | finalFullFrame.size.height = finalFullFrame.size.width / multiplier
75 | }
76 | else{
77 | finalFullFrame.size.height = UIScreen.main.bounds.size.width
78 | finalFullFrame.size.height = UIScreen.main.bounds.size.width
79 | }
80 |
81 | return finalFullFrame
82 |
83 | }
84 |
85 | func setupGesture(){
86 | mainImageView.isUserInteractionEnabled = true
87 | let panGesture = UIPanGestureRecognizer(target: self, action: #selector(self.imageViewDidPan))
88 | panGesture.minimumNumberOfTouches = 1
89 | panGesture.maximumNumberOfTouches = 1
90 | mainImageView.addGestureRecognizer(panGesture)
91 |
92 | }
93 |
94 | func imageViewDidPan(recognizer: UIPanGestureRecognizer){
95 | let translation: CGPoint = recognizer.translation(in: self.view)
96 | var recognizerFrame: CGRect = recognizer.view!.frame
97 | recognizerFrame.origin.x += translation.x
98 | recognizerFrame.origin.y += translation.y
99 |
100 | let displacement: CGFloat = fabs((recognizerFrame.origin.y + mainImageView.frame.size.height / 2) - UIScreen.main.bounds.size.height / 2)
101 | maskView.alpha = max(1 - displacement / (UIScreen.main.bounds.size.height / 0.9), kMinBlackMaskAlpha)
102 | recognizer.view?.frame = recognizerFrame
103 |
104 | if(recognizer.state == UIGestureRecognizerState.ended){
105 | self.animationDidFinish(endRect: recognizerFrame.origin)
106 | }
107 | recognizer .setTranslation(CGPoint(x:0.0, y:0.0), in: self.view)
108 | }
109 |
110 | func animationDidFinish (endRect: CGPoint){
111 | var displacement: CGFloat = _finalRect.origin.y - endRect.y
112 | if(displacement < 0){
113 | displacement = -(displacement)
114 | }
115 |
116 | if displacement <= 60.0 {
117 | UIView.animate(withDuration: 0.3, animations: {(_: Void) -> Void in
118 | self.mainImageView.frame = self._finalRect
119 | self.maskView.alpha = 1.0
120 | }, completion: { _ in })
121 | }
122 | else{
123 | UIView.animate(withDuration: 0.3, animations: {(_: Void) -> Void in
124 | self.mainImageView.frame = self.initialRect
125 | }, completion: {(_ finished: Bool) -> Void in
126 | self.navigationController?.popViewController(animated: false)
127 | })
128 | }
129 | }
130 | }
131 |
--------------------------------------------------------------------------------
/ImageSlider-Swift/FirstViewController.xib:
--------------------------------------------------------------------------------
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 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/ImageSlider-Swift/SBSliderView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SBSliderView.swift
3 | // ImageSlider-Swift
4 | //
5 | // Created by Vamshi Krishna on 24/03/17.
6 | // Copyright © 2017 VamshiKrishna. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | protocol SBSliderDelegate: NSObjectProtocol {
12 | func sbslider(_ sbslider: SBSliderView, didTapOn targetImage: UIImage, andParentView targetView: UIImageView)
13 | }
14 |
15 | class SBSliderView: UIView, UIScrollViewDelegate, UIGestureRecognizerDelegate {
16 |
17 | var imagesArray = [Any]()
18 | var autoSrcollEnabled:Bool = false
19 | var activeTimer:Timer?
20 |
21 | weak var _delegate:SBSliderDelegate?
22 | weak var delegate: SBSliderDelegate?
23 |
24 | @IBOutlet var sliderMainScroller: UIScrollView!
25 | @IBOutlet weak var pageIndicator: UIPageControl!
26 |
27 | func createSlider(withImages images: [Any], withAutoScroll isAutoScrollEnabled: Bool, in parentView: UIView) {
28 | self.frame = CGRect(x: CGFloat(0), y: CGFloat(0), width: CGFloat(UIScreen.main.bounds.size.width), height: CGFloat(UIScreen.main.bounds.size.height))
29 | imagesArray = images
30 | print(imagesArray)
31 | autoSrcollEnabled = isAutoScrollEnabled
32 | sliderMainScroller.isPagingEnabled = true
33 | sliderMainScroller.delegate = self
34 | pageIndicator.numberOfPages = imagesArray.count
35 |
36 | sliderMainScroller.contentSize = CGSize(width:CGFloat(UIScreen.main.bounds.size.width*3*(CGFloat(imagesArray.count))), height:CGFloat(sliderMainScroller.frame.size.height))
37 | var mainCount: Int = 0
38 |
39 | for _ in 0..<3 {
40 |
41 | for i in 0.. 1) && (isAutoScrollEnabled) {
66 | self.startTimerThread()
67 | }
68 |
69 | }
70 |
71 | func tapOnImage(gesture: UITapGestureRecognizer){
72 | let targetView: UIImageView? = (gesture.view as? UIImageView)
73 | _delegate?.sbslider(self , didTapOn: (targetView?.image)!, andParentView: targetView!)
74 |
75 | }
76 |
77 | //#pragma mark - UIScrollView delegate
78 |
79 | func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
80 | let width: CGFloat = scrollView.frame.size.width
81 | let page: Int = Int((scrollView.contentOffset.x + (0.5 * width)) / width)
82 | var moveToPage: Int = page
83 | if moveToPage == 0 {
84 | moveToPage = imagesArray.count
85 | let startX = CGFloat(moveToPage) * UIScreen.main.bounds.size.width
86 | scrollView.setContentOffset(CGPoint(x: startX, y: CGFloat(0)), animated: false)
87 | }
88 | else if moveToPage == ((imagesArray.count * 3) - 1) {
89 | moveToPage = imagesArray.count - 1
90 | let startX = CGFloat(moveToPage) * UIScreen.main.bounds.size.width
91 | scrollView.setContentOffset(CGPoint(x: startX, y: CGFloat(0)), animated: false)
92 | }
93 |
94 | if moveToPage < imagesArray.count {
95 | pageIndicator.currentPage = moveToPage
96 | }
97 | else {
98 | moveToPage = moveToPage % imagesArray.count
99 | pageIndicator.currentPage = moveToPage
100 | }
101 | if (imagesArray.count > 1) && (autoSrcollEnabled) {
102 | self.startTimerThread()
103 | }
104 |
105 | }
106 |
107 | func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) {
108 | let width: CGFloat = scrollView.frame.size.width
109 | let page: Int = Int((scrollView.contentOffset.x + (0.5 * width)) / width)
110 | var moveToPage: Int = page
111 | if moveToPage == 0 {
112 | moveToPage = imagesArray.count
113 | let startX = CGFloat(moveToPage) * UIScreen.main.bounds.size.width
114 | scrollView.setContentOffset(CGPoint(x: startX, y: CGFloat(0)), animated: false)
115 | }
116 | else if moveToPage == ((imagesArray.count * 3) - 1) {
117 | moveToPage = imagesArray.count - 1
118 | let startX = CGFloat(moveToPage) * UIScreen.main.bounds.size.width
119 | scrollView.setContentOffset(CGPoint(x: startX, y: CGFloat(0)), animated: false)
120 | }
121 |
122 | if moveToPage < imagesArray.count {
123 | pageIndicator.currentPage = moveToPage
124 | }
125 | else {
126 | moveToPage = moveToPage % imagesArray.count
127 | pageIndicator.currentPage = moveToPage
128 | }
129 | }
130 |
131 | func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
132 | if((activeTimer) != nil){
133 | activeTimer?.invalidate()
134 | activeTimer = nil
135 | }
136 | }
137 | //pragma mark end
138 | func slideImage(){
139 |
140 | var startX: CGFloat = 0.0
141 | let width: CGFloat = sliderMainScroller.frame.size.width
142 | let page: Int = Int((sliderMainScroller.contentOffset.x + (0.5 * width)) / width)
143 | let nextPage: Int = page + 1
144 | startX = CGFloat(nextPage) * width
145 |
146 | sliderMainScroller .setContentOffset(CGPoint(x:startX, y:0), animated: true)
147 | }
148 |
149 | func startTimerThread(){
150 | if((activeTimer) != nil){
151 | activeTimer?.invalidate()
152 | activeTimer = nil
153 | }
154 |
155 | activeTimer = Timer.scheduledTimer(timeInterval: 3.0, target: self, selector: #selector(self.slideImage), userInfo: nil, repeats: true)
156 |
157 | }
158 |
159 | func startAutoPlay() {
160 | autoSrcollEnabled = true
161 | if(imagesArray .count > 1 && autoSrcollEnabled){
162 | self .startTimerThread()
163 | }
164 | }
165 |
166 | func stopAutoPlay() {
167 | autoSrcollEnabled = false
168 | if((activeTimer) != nil){
169 | activeTimer?.invalidate()
170 | activeTimer = nil
171 | }
172 | }
173 | }
174 |
--------------------------------------------------------------------------------
/ImageSlider-Swift.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 960CEA681E7FB6AB00E7D2DF /* SBPhotoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 960CEA661E7FB6AB00E7D2DF /* SBPhotoViewController.swift */; };
11 | 960CEA691E7FB6AB00E7D2DF /* SBPhotoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 960CEA671E7FB6AB00E7D2DF /* SBPhotoViewController.xib */; };
12 | 963D93141E84DDD500299484 /* SBSliderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963D93131E84DDD500299484 /* SBSliderView.swift */; };
13 | 963D93181E850DF500299484 /* SBSliderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 963D93171E850DF500299484 /* SBSliderView.xib */; };
14 | 963D931B1E85173300299484 /* FirstViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963D93191E85173300299484 /* FirstViewController.swift */; };
15 | 963D931C1E85173300299484 /* FirstViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 963D931A1E85173300299484 /* FirstViewController.xib */; };
16 | 963D93231E85188800299484 /* Black-Car-HD-Wallpaper.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 963D931D1E85188800299484 /* Black-Car-HD-Wallpaper.jpg */; };
17 | 963D93241E85188800299484 /* lamborghini_murcielago_superveloce_2-2880x1800.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 963D931E1E85188800299484 /* lamborghini_murcielago_superveloce_2-2880x1800.jpg */; };
18 | 963D93251E85188800299484 /* nature-landscape-photography-lanscape-cool-hd-wallpapers-fullscreen-high-resolution.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 963D931F1E85188800299484 /* nature-landscape-photography-lanscape-cool-hd-wallpapers-fullscreen-high-resolution.jpg */; };
19 | 963D93261E85188800299484 /* next.png in Resources */ = {isa = PBXBuildFile; fileRef = 963D93201E85188800299484 /* next.png */; };
20 | 963D93271E85188800299484 /* previous.png in Resources */ = {isa = PBXBuildFile; fileRef = 963D93211E85188800299484 /* previous.png */; };
21 | 963D93281E85188800299484 /* wallpaper-hd-3151.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 963D93221E85188800299484 /* wallpaper-hd-3151.jpg */; };
22 | 963D932A1E851B7A00299484 /* SBPhotoManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963D93291E851B7A00299484 /* SBPhotoManager.swift */; };
23 | 969369C01E7E80FA00018988 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 969369BF1E7E80FA00018988 /* AppDelegate.swift */; };
24 | 969369C71E7E80FA00018988 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 969369C61E7E80FA00018988 /* Assets.xcassets */; };
25 | 969369CA1E7E80FA00018988 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 969369C81E7E80FA00018988 /* LaunchScreen.storyboard */; };
26 | /* End PBXBuildFile section */
27 |
28 | /* Begin PBXFileReference section */
29 | 960CEA661E7FB6AB00E7D2DF /* SBPhotoViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SBPhotoViewController.swift; sourceTree = ""; };
30 | 960CEA671E7FB6AB00E7D2DF /* SBPhotoViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SBPhotoViewController.xib; sourceTree = ""; };
31 | 963D93131E84DDD500299484 /* SBSliderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SBSliderView.swift; sourceTree = ""; };
32 | 963D93171E850DF500299484 /* SBSliderView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SBSliderView.xib; sourceTree = ""; };
33 | 963D93191E85173300299484 /* FirstViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FirstViewController.swift; sourceTree = ""; };
34 | 963D931A1E85173300299484 /* FirstViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FirstViewController.xib; sourceTree = ""; };
35 | 963D931D1E85188800299484 /* Black-Car-HD-Wallpaper.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Black-Car-HD-Wallpaper.jpg"; sourceTree = ""; };
36 | 963D931E1E85188800299484 /* lamborghini_murcielago_superveloce_2-2880x1800.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "lamborghini_murcielago_superveloce_2-2880x1800.jpg"; sourceTree = ""; };
37 | 963D931F1E85188800299484 /* nature-landscape-photography-lanscape-cool-hd-wallpapers-fullscreen-high-resolution.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "nature-landscape-photography-lanscape-cool-hd-wallpapers-fullscreen-high-resolution.jpg"; sourceTree = ""; };
38 | 963D93201E85188800299484 /* next.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = next.png; sourceTree = ""; };
39 | 963D93211E85188800299484 /* previous.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = previous.png; sourceTree = ""; };
40 | 963D93221E85188800299484 /* wallpaper-hd-3151.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "wallpaper-hd-3151.jpg"; sourceTree = ""; };
41 | 963D93291E851B7A00299484 /* SBPhotoManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SBPhotoManager.swift; sourceTree = ""; };
42 | 969369BC1E7E80FA00018988 /* ImageSlider-Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ImageSlider-Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; };
43 | 969369BF1E7E80FA00018988 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
44 | 969369C61E7E80FA00018988 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
45 | 969369C91E7E80FA00018988 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
46 | 969369CB1E7E80FA00018988 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
47 | /* End PBXFileReference section */
48 |
49 | /* Begin PBXFrameworksBuildPhase section */
50 | 969369B91E7E80FA00018988 /* Frameworks */ = {
51 | isa = PBXFrameworksBuildPhase;
52 | buildActionMask = 2147483647;
53 | files = (
54 | );
55 | runOnlyForDeploymentPostprocessing = 0;
56 | };
57 | /* End PBXFrameworksBuildPhase section */
58 |
59 | /* Begin PBXGroup section */
60 | 969369B31E7E80FA00018988 = {
61 | isa = PBXGroup;
62 | children = (
63 | 969369BE1E7E80FA00018988 /* ImageSlider-Swift */,
64 | 969369BD1E7E80FA00018988 /* Products */,
65 | );
66 | sourceTree = "";
67 | };
68 | 969369BD1E7E80FA00018988 /* Products */ = {
69 | isa = PBXGroup;
70 | children = (
71 | 969369BC1E7E80FA00018988 /* ImageSlider-Swift.app */,
72 | );
73 | name = Products;
74 | sourceTree = "";
75 | };
76 | 969369BE1E7E80FA00018988 /* ImageSlider-Swift */ = {
77 | isa = PBXGroup;
78 | children = (
79 | 969369BF1E7E80FA00018988 /* AppDelegate.swift */,
80 | 960CEA661E7FB6AB00E7D2DF /* SBPhotoViewController.swift */,
81 | 963D93131E84DDD500299484 /* SBSliderView.swift */,
82 | 963D93191E85173300299484 /* FirstViewController.swift */,
83 | 963D93291E851B7A00299484 /* SBPhotoManager.swift */,
84 | 963D931A1E85173300299484 /* FirstViewController.xib */,
85 | 963D93171E850DF500299484 /* SBSliderView.xib */,
86 | 960CEA671E7FB6AB00E7D2DF /* SBPhotoViewController.xib */,
87 | 963D931D1E85188800299484 /* Black-Car-HD-Wallpaper.jpg */,
88 | 963D931E1E85188800299484 /* lamborghini_murcielago_superveloce_2-2880x1800.jpg */,
89 | 963D931F1E85188800299484 /* nature-landscape-photography-lanscape-cool-hd-wallpapers-fullscreen-high-resolution.jpg */,
90 | 963D93201E85188800299484 /* next.png */,
91 | 963D93211E85188800299484 /* previous.png */,
92 | 963D93221E85188800299484 /* wallpaper-hd-3151.jpg */,
93 | 969369C61E7E80FA00018988 /* Assets.xcassets */,
94 | 969369C81E7E80FA00018988 /* LaunchScreen.storyboard */,
95 | 969369CB1E7E80FA00018988 /* Info.plist */,
96 | );
97 | path = "ImageSlider-Swift";
98 | sourceTree = "";
99 | };
100 | /* End PBXGroup section */
101 |
102 | /* Begin PBXNativeTarget section */
103 | 969369BB1E7E80FA00018988 /* ImageSlider-Swift */ = {
104 | isa = PBXNativeTarget;
105 | buildConfigurationList = 969369CE1E7E80FA00018988 /* Build configuration list for PBXNativeTarget "ImageSlider-Swift" */;
106 | buildPhases = (
107 | 969369B81E7E80FA00018988 /* Sources */,
108 | 969369B91E7E80FA00018988 /* Frameworks */,
109 | 969369BA1E7E80FA00018988 /* Resources */,
110 | );
111 | buildRules = (
112 | );
113 | dependencies = (
114 | );
115 | name = "ImageSlider-Swift";
116 | productName = "ImageSlider-Swift";
117 | productReference = 969369BC1E7E80FA00018988 /* ImageSlider-Swift.app */;
118 | productType = "com.apple.product-type.application";
119 | };
120 | /* End PBXNativeTarget section */
121 |
122 | /* Begin PBXProject section */
123 | 969369B41E7E80FA00018988 /* Project object */ = {
124 | isa = PBXProject;
125 | attributes = {
126 | LastSwiftUpdateCheck = 0820;
127 | LastUpgradeCheck = 0820;
128 | ORGANIZATIONNAME = VamshiKrishna;
129 | TargetAttributes = {
130 | 969369BB1E7E80FA00018988 = {
131 | CreatedOnToolsVersion = 8.2.1;
132 | DevelopmentTeam = 9R49F7NN23;
133 | ProvisioningStyle = Automatic;
134 | };
135 | };
136 | };
137 | buildConfigurationList = 969369B71E7E80FA00018988 /* Build configuration list for PBXProject "ImageSlider-Swift" */;
138 | compatibilityVersion = "Xcode 3.2";
139 | developmentRegion = English;
140 | hasScannedForEncodings = 0;
141 | knownRegions = (
142 | en,
143 | Base,
144 | );
145 | mainGroup = 969369B31E7E80FA00018988;
146 | productRefGroup = 969369BD1E7E80FA00018988 /* Products */;
147 | projectDirPath = "";
148 | projectRoot = "";
149 | targets = (
150 | 969369BB1E7E80FA00018988 /* ImageSlider-Swift */,
151 | );
152 | };
153 | /* End PBXProject section */
154 |
155 | /* Begin PBXResourcesBuildPhase section */
156 | 969369BA1E7E80FA00018988 /* Resources */ = {
157 | isa = PBXResourcesBuildPhase;
158 | buildActionMask = 2147483647;
159 | files = (
160 | 963D93251E85188800299484 /* nature-landscape-photography-lanscape-cool-hd-wallpapers-fullscreen-high-resolution.jpg in Resources */,
161 | 960CEA691E7FB6AB00E7D2DF /* SBPhotoViewController.xib in Resources */,
162 | 963D93241E85188800299484 /* lamborghini_murcielago_superveloce_2-2880x1800.jpg in Resources */,
163 | 963D931C1E85173300299484 /* FirstViewController.xib in Resources */,
164 | 969369CA1E7E80FA00018988 /* LaunchScreen.storyboard in Resources */,
165 | 963D93181E850DF500299484 /* SBSliderView.xib in Resources */,
166 | 963D93271E85188800299484 /* previous.png in Resources */,
167 | 963D93261E85188800299484 /* next.png in Resources */,
168 | 963D93281E85188800299484 /* wallpaper-hd-3151.jpg in Resources */,
169 | 969369C71E7E80FA00018988 /* Assets.xcassets in Resources */,
170 | 963D93231E85188800299484 /* Black-Car-HD-Wallpaper.jpg in Resources */,
171 | );
172 | runOnlyForDeploymentPostprocessing = 0;
173 | };
174 | /* End PBXResourcesBuildPhase section */
175 |
176 | /* Begin PBXSourcesBuildPhase section */
177 | 969369B81E7E80FA00018988 /* Sources */ = {
178 | isa = PBXSourcesBuildPhase;
179 | buildActionMask = 2147483647;
180 | files = (
181 | 960CEA681E7FB6AB00E7D2DF /* SBPhotoViewController.swift in Sources */,
182 | 963D93141E84DDD500299484 /* SBSliderView.swift in Sources */,
183 | 969369C01E7E80FA00018988 /* AppDelegate.swift in Sources */,
184 | 963D932A1E851B7A00299484 /* SBPhotoManager.swift in Sources */,
185 | 963D931B1E85173300299484 /* FirstViewController.swift in Sources */,
186 | );
187 | runOnlyForDeploymentPostprocessing = 0;
188 | };
189 | /* End PBXSourcesBuildPhase section */
190 |
191 | /* Begin PBXVariantGroup section */
192 | 969369C81E7E80FA00018988 /* LaunchScreen.storyboard */ = {
193 | isa = PBXVariantGroup;
194 | children = (
195 | 969369C91E7E80FA00018988 /* Base */,
196 | );
197 | name = LaunchScreen.storyboard;
198 | sourceTree = "";
199 | };
200 | /* End PBXVariantGroup section */
201 |
202 | /* Begin XCBuildConfiguration section */
203 | 969369CC1E7E80FA00018988 /* Debug */ = {
204 | isa = XCBuildConfiguration;
205 | buildSettings = {
206 | ALWAYS_SEARCH_USER_PATHS = NO;
207 | CLANG_ANALYZER_NONNULL = YES;
208 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
209 | CLANG_CXX_LIBRARY = "libc++";
210 | CLANG_ENABLE_MODULES = YES;
211 | CLANG_ENABLE_OBJC_ARC = YES;
212 | CLANG_WARN_BOOL_CONVERSION = YES;
213 | CLANG_WARN_CONSTANT_CONVERSION = YES;
214 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
215 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
216 | CLANG_WARN_EMPTY_BODY = YES;
217 | CLANG_WARN_ENUM_CONVERSION = YES;
218 | CLANG_WARN_INFINITE_RECURSION = YES;
219 | CLANG_WARN_INT_CONVERSION = YES;
220 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
221 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
222 | CLANG_WARN_UNREACHABLE_CODE = YES;
223 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
224 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
225 | COPY_PHASE_STRIP = NO;
226 | DEBUG_INFORMATION_FORMAT = dwarf;
227 | ENABLE_STRICT_OBJC_MSGSEND = YES;
228 | ENABLE_TESTABILITY = YES;
229 | GCC_C_LANGUAGE_STANDARD = gnu99;
230 | GCC_DYNAMIC_NO_PIC = NO;
231 | GCC_NO_COMMON_BLOCKS = YES;
232 | GCC_OPTIMIZATION_LEVEL = 0;
233 | GCC_PREPROCESSOR_DEFINITIONS = (
234 | "DEBUG=1",
235 | "$(inherited)",
236 | );
237 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
238 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
239 | GCC_WARN_UNDECLARED_SELECTOR = YES;
240 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
241 | GCC_WARN_UNUSED_FUNCTION = YES;
242 | GCC_WARN_UNUSED_VARIABLE = YES;
243 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
244 | MTL_ENABLE_DEBUG_INFO = YES;
245 | ONLY_ACTIVE_ARCH = YES;
246 | SDKROOT = iphoneos;
247 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
248 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
249 | };
250 | name = Debug;
251 | };
252 | 969369CD1E7E80FA00018988 /* Release */ = {
253 | isa = XCBuildConfiguration;
254 | buildSettings = {
255 | ALWAYS_SEARCH_USER_PATHS = NO;
256 | CLANG_ANALYZER_NONNULL = YES;
257 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
258 | CLANG_CXX_LIBRARY = "libc++";
259 | CLANG_ENABLE_MODULES = YES;
260 | CLANG_ENABLE_OBJC_ARC = YES;
261 | CLANG_WARN_BOOL_CONVERSION = YES;
262 | CLANG_WARN_CONSTANT_CONVERSION = YES;
263 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
264 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
265 | CLANG_WARN_EMPTY_BODY = YES;
266 | CLANG_WARN_ENUM_CONVERSION = YES;
267 | CLANG_WARN_INFINITE_RECURSION = YES;
268 | CLANG_WARN_INT_CONVERSION = YES;
269 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
270 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
271 | CLANG_WARN_UNREACHABLE_CODE = YES;
272 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
273 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
274 | COPY_PHASE_STRIP = NO;
275 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
276 | ENABLE_NS_ASSERTIONS = NO;
277 | ENABLE_STRICT_OBJC_MSGSEND = YES;
278 | GCC_C_LANGUAGE_STANDARD = gnu99;
279 | GCC_NO_COMMON_BLOCKS = YES;
280 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
281 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
282 | GCC_WARN_UNDECLARED_SELECTOR = YES;
283 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
284 | GCC_WARN_UNUSED_FUNCTION = YES;
285 | GCC_WARN_UNUSED_VARIABLE = YES;
286 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
287 | MTL_ENABLE_DEBUG_INFO = NO;
288 | SDKROOT = iphoneos;
289 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
290 | VALIDATE_PRODUCT = YES;
291 | };
292 | name = Release;
293 | };
294 | 969369CF1E7E80FA00018988 /* Debug */ = {
295 | isa = XCBuildConfiguration;
296 | buildSettings = {
297 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
298 | DEVELOPMENT_TEAM = 9R49F7NN23;
299 | INFOPLIST_FILE = "ImageSlider-Swift/Info.plist";
300 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
301 | PRODUCT_BUNDLE_IDENTIFIER = "VamshiKrishna.ImageSlider-Swift";
302 | PRODUCT_NAME = "$(TARGET_NAME)";
303 | SWIFT_VERSION = 3.0;
304 | };
305 | name = Debug;
306 | };
307 | 969369D01E7E80FA00018988 /* Release */ = {
308 | isa = XCBuildConfiguration;
309 | buildSettings = {
310 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
311 | DEVELOPMENT_TEAM = 9R49F7NN23;
312 | INFOPLIST_FILE = "ImageSlider-Swift/Info.plist";
313 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
314 | PRODUCT_BUNDLE_IDENTIFIER = "VamshiKrishna.ImageSlider-Swift";
315 | PRODUCT_NAME = "$(TARGET_NAME)";
316 | SWIFT_VERSION = 3.0;
317 | };
318 | name = Release;
319 | };
320 | /* End XCBuildConfiguration section */
321 |
322 | /* Begin XCConfigurationList section */
323 | 969369B71E7E80FA00018988 /* Build configuration list for PBXProject "ImageSlider-Swift" */ = {
324 | isa = XCConfigurationList;
325 | buildConfigurations = (
326 | 969369CC1E7E80FA00018988 /* Debug */,
327 | 969369CD1E7E80FA00018988 /* Release */,
328 | );
329 | defaultConfigurationIsVisible = 0;
330 | defaultConfigurationName = Release;
331 | };
332 | 969369CE1E7E80FA00018988 /* Build configuration list for PBXNativeTarget "ImageSlider-Swift" */ = {
333 | isa = XCConfigurationList;
334 | buildConfigurations = (
335 | 969369CF1E7E80FA00018988 /* Debug */,
336 | 969369D01E7E80FA00018988 /* Release */,
337 | );
338 | defaultConfigurationIsVisible = 0;
339 | defaultConfigurationName = Release;
340 | };
341 | /* End XCConfigurationList section */
342 | };
343 | rootObject = 969369B41E7E80FA00018988 /* Project object */;
344 | }
345 |
--------------------------------------------------------------------------------