Month: November 2018

IOS swipe detection in all direction : left , right, up and down in swift 4IOS swipe detection in all direction : left , right, up and down in swift 4

Step 1 : Add this in viewDidLoad function  [java] let swipeLeft = UISwipeGestureRecognizer(target: self, action: #selector(handleGesture)) swipeLeft.direction = .left self.view.addGestureRecognizer(swipeLeft) let swipeRight = UISwipeGestureRecognizer(target: self, action: #selector(handleGesture)) swipeRight.direction = .right

Android get current location (latitude and longitude) using GPSAndroid get current location (latitude and longitude) using GPS

Step 1 : Create a project and add these permissions to AndroidManifest.xml [java] <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission. ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.INTERNET" /> [/java] Step 2 : Create a Service