Record a video of your app running in the iOS simulator

Record a video of your app running in the iOS simulator Creating a video of your iOS app running in the Xcode simulator is as simple running the following from a terminal on macOs: xcrun simctl io booted recordVideo filename.mov


Send an Email from App with Android Intent

Send an Email from App with Android Intent       Intent emailIntent = new Intent(Intent.ACTION_SEND);     // The intent does not have a URI, so declare the “text/plain” MIME type emailIntent.setType(“text/html”); emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] {“david@google.com”}); // recipients emailIntent.putExtra(Intent.EXTRA_SUBJECT, “Email subject”); emailIntent.putExtra(Intent.EXTRA_TEXT, “Email message text…”); emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(“content://path/to/email/attachment”));     […]


How to use Swift classes all across an Objective-C project

The most universal solution is to change SWIFT_OBJC_INTERFACE_HEADER_NAME (“Objective-C Generated Interface Header Name”) under Project’s, not Targets, Build Settings, to: $(PROJECT_NAME)-Swift.h — one per project; $(SWIFT_MODULE_NAME)-Swift.h — one per module (default value). Then import the Project Header, example: #import MyProjectName-Swift.h


Sizes of iPhone UI Elements

Taken from idev101 more in: http://www.idev101.com/code/User_Interface/sizes.html iPhone Development 101: User Interface: Sizes of iPhone UI Elements How to detect the current device size and kind Element iPhone 4S (and earlier) iPhone 5 iPhone 6 & 7 iPhone 6 Plus & 7 Plus Window (including status bar area) 320 x 480 pts 320 […]


Vary for Traits in Xcode 8

Vary for Traits in Xcode 8 The UI to select the size classes has changed in xcode 8. Now it is as follows: Any constraints that you add without selecting Vary for Traits options will be considered as for all the size classes( Any Any previously) To add a constraint […]


How to debug deep linking in iOS

What is deep linking? Deep linking basically enables you to open an app from another app or a website while passing on parameters. This mechanism works with custom URL schemes which you can define in the .plist of your app. Why deep linking? If you have an app with lookup functionality […]


Sending an HTTP POST request on iOS

The following code describes a simple example using POST method.(How one can pass data by POST method) You can use the following code snippet, as described in this article: Here, I describe how one can use of POST method. 1. Set post string with actual username and password. NSString *post […]


iOS Singletons – Objective-C

A singleton is a special kind of class where only one instance of the class exists for the current process. (In the case of an iOS app, the one instance is shared across the entire app.) Some examples in UIKit are [UIApplication sharedApplication] (which returns the sole instance of the application […]


Show animation when addsubview 1

If you want to add a subview with animation, try this simple snippet: PS: Replace myView with the name of the view you want to replace. CATransition *applicationLoadViewIn =[CATransition animation]; [applicationLoadViewIn setDuration:duration]; [applicationLoadViewIn setType:kCATransitionReveal]; [applicationLoadViewIn setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]]; [[myView layer]addAnimation:applicationLoadViewIn forKey:kCATransitionReveal];


NSOperation – Tutorial

Operation Queues GCD is a low-level C API that enables developers to execute tasks concurrently. Operation queues, on the other hand, are high level abstraction of the queue model, and is built on top of GCD. That means you can execute tasks concurrently just like GCD, but in an object-oriented […]