ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Swift - How to do swipe recognition

Swift

IOS (Operating System)

Xcode (Software)

solron75

solron75swift

Software (Industry)

Автор: solron75

Загружено: 2015-11-14

Просмотров: 6209

Описание: iOS gestures can be useful in your app. And here is a short demonstration on how to implement iOS gestures in your app.

This example is done with Xcode 7.1 and compiled for iOS 9.1.

Some of the code in the video is in the text below. But not correctly since some characters are not allowed to use in Youtube descriptions. You can find the code on my website at: http://soltveit.org/ios-gestures-in-s...

Or at github here: https://github.com/solron/Swipe-Gesture

It seems like iOS gestures require one recogniser for each direction.

//Recogniser
let swipeRight = UISwipeGestureRecognizer(target: self, action: "respond:")
swipeRight.direction = .Right
view.addGestureRecognizer(swipeRight)


respond is the name of the handler or function to run the code. So anything you want happening when your user is swiping goes into that function. Like this, just an example to change the text in a label.

// Respond function
func respond(gesture: UIGestureRecognizer)
lblDirection.text = "Right"

enjoy!

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Swift - How to do swipe recognition

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]