Create Basic Toast in Andriod Studio

1. Create a Blank Activity. 2. Naming the activity “HomeActivity.java”. 3. User Interface (drag and drop component are there) Named as “activity_home.xml”. 4. Drag and drop the “NEW BUTTON” on the screen and double click the button to set the button title and @id. 5. Declare the button variable and set the Event listener before…

Custom array using to sort the Array based on the Distance

1. Create Swift file and paste it the below code import Foundation import CoreLocation final public class Places : NSObject { var title: String? var cllocation: CLLocation var regionRadius: Double var location: String? var type: String? var distance : Double? var coordinate : CLLocationCoordinate2D init(title:String , cllocation: CLLocation , regionRadius: Double, location: String, type: String…

Create Interactive local notification and simple notification.

1. Create NSObject file to implement the notification functions. 2. Register the notification based on the resolutions.(iOS 7 /iOS 8 and above) 3. Separate the notification (interactive /local). 4. Cancel the notification 5. Cancel the particular notifications. 6. Handle the notification when receiving. Create NSObject file. File named as “Notification”. // Notification.h file #import <Foundation/Foundation.h>…

UIColor Category file in Swift (extension)

Aspect of Class Initializers. The Swift language has two different types of initializers They are followed by : — designated initializers. — convenience initializers. Designated initializers used for initialization. Its getting the parameter to set the value in the method variable. init(sender: String, recipient: String) { self.sender = sender self.recipient = recipient timeStamp = NSDate()…

String Compare in C#

The “System.IO” namespace contains types that allow reading and writing to files and data streams, and types that provide basic file and directory support. The “System” namespace contains fundamental classes and base classes that define commonly-used value and reference data types, events and event handlers, interfaces, attributes, and processing exceptions. The “System.Text” namespace contains classes…

Get the Max date from the Array using KVC (Key-value coding)

Key-value coding is a mechanism for accessing an object’s properties indirectly, using strings to identify properties, rather than through invocation of an accessor method or accessing them directly through instance variables. In essence, key-value coding defines the patterns and method signatures that your application’s accessor methods implement. Get the Max date from the Array using…

How to create a circular dotted line as a CALayer?

ViewController.h file @interface ViewController () @property (nonatomic,strong) IBOutlet UIImageView *origImage; @end ViewController.m file @implementation ViewController { } @synthesize origImage; – (void)viewDidLoad { [super viewDidLoad]; // “CAShapeLayer” The path defining the shape to be rendered // UIBezierPath using to create a circular path CAShapeLayer *circleLayer = [CAShapeLayer layer]; [circleLayer setPath:[[UIBezierPath bezierPathWithOvalInRect: CGRectMake(50, 50, 100, 100)] CGPath]];…

Padding the textfields

Most of the programmer knows the basic concepts of Objective c. But the “Happy Coding” going to do they describe about “what is the scenario achieved By “Happy Coding” in the platform. That have posted here. Any Clarification on that, Kindly Comment it. Add Padding in the textfields. Use “Category” file  to achieve the padding…