SWIFT CODE, Gesture Recognizers on UIImageView
- or -
Post a project like this3352
£10(approx. $13)
- Posted:
- Proposals: 2
- Remote
- #674999
- Awarded
Description
Experience Level: Entry
General information for the app: 1 section of code
Kind of development: Customization of existing app
Description of requirements/features: I just need a small section of code for implementing 3 gesture recognizers within an existing UIImage,
I need it to scale and rotate with pinch, and pan.
Done on Sunday if poss. You will see in the code that the image is selected from the PhotoLibrary.
Specific technologies required: SWIFT CODE
Extra notes: //
// ViewController.swift
// CASE-iD
//
// Created by Ben Swift on 27/01/2015.
// Copyright (c) 2015 Jelliskin Ltd. All rights reserved.
//
import UIKit
class ViewController: UIViewController, UINavigationControllerDelegate, UIImagePickerControllerDelegate {
@IBOutlet var pickedImage: UIImageView!
func imagePickerController(picker: UIImagePickerController!, didFinishPickingImage image: UIImage!, editingInfo: [NSObject : AnyObject]!) {
println("Image selected")
self.dismissViewControllerAnimated(true, completion: nil)
pickedImage.image = image
}
@IBAction func pickImage(sender: AnyObject) {
var image = UIImagePickerController()
image.delegate = self
image.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
image.allowsEditing = false
self.presentViewController(image, animated: true, completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
Parse.setApplicationId("Z46N5O2BNCZhATTxWSGa61q1aK5j3cEsCljcXr93", clientKey: "1n3kHYOIj3kc79C6wTaAjKCxxkVEoG6egQs39cwK")
var pinchImage = UIPinchGestureRecognizer(target:self, action:"pinched:")
println("pinched")
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Kind of development: Customization of existing app
Description of requirements/features: I just need a small section of code for implementing 3 gesture recognizers within an existing UIImage,
I need it to scale and rotate with pinch, and pan.
Done on Sunday if poss. You will see in the code that the image is selected from the PhotoLibrary.
Specific technologies required: SWIFT CODE
Extra notes: //
// ViewController.swift
// CASE-iD
//
// Created by Ben Swift on 27/01/2015.
// Copyright (c) 2015 Jelliskin Ltd. All rights reserved.
//
import UIKit
class ViewController: UIViewController, UINavigationControllerDelegate, UIImagePickerControllerDelegate {
@IBOutlet var pickedImage: UIImageView!
func imagePickerController(picker: UIImagePickerController!, didFinishPickingImage image: UIImage!, editingInfo: [NSObject : AnyObject]!) {
println("Image selected")
self.dismissViewControllerAnimated(true, completion: nil)
pickedImage.image = image
}
@IBAction func pickImage(sender: AnyObject) {
var image = UIImagePickerController()
image.delegate = self
image.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
image.allowsEditing = false
self.presentViewController(image, animated: true, completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
Parse.setApplicationId("Z46N5O2BNCZhATTxWSGa61q1aK5j3cEsCljcXr93", clientKey: "1n3kHYOIj3kc79C6wTaAjKCxxkVEoG6egQs39cwK")
var pinchImage = UIPinchGestureRecognizer(target:self, action:"pinched:")
println("pinched")
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Ben S.
100% (9)Projects Completed
5
Freelancers worked with
5
Projects awarded
21%
Last project
14 Dec 2016
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies