php artisan - common comands
php artisan tinker - playground
php artisan make:controller ArticlesController
| //new navigation code for apple navigation | |
| CLLocationCoordinate2D coords = CLLocationCoordinate2DMake(self.m_lattitutef,self.m_longitutef); | |
| NSLog(@"%f - %f", self.m_longitutef, self.m_lattitutef); | |
| MKPlacemark *place = [[MKPlacemark alloc] | |
| initWithCoordinate:coords addressDictionary:nil]; | |
| MKMapItem *mapItem = [[MKMapItem alloc]initWithPlacemark:place]; | |
| //current location | |
| MKMapItem *mapItem2 = [MKMapItem mapItemForCurrentLocation]; |
Creating and adding multiple bar buttons to navigation bar
let addBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(ViewController.addPerson(_:)))
let filterBarButtonItem = UIBarButtonItem(title: "Filter", style: .plain, target: self, action: #selector(ViewController.filter))
navigationItem.rightBarButtonItems = [addBarButtonItem, filterBarButtonItem]
creating a actionsheet style alert controller without using third party apps
| protocol Animal{ | |
| func run() | |
| func stop() | |
| } |
| class Cat{ | |
| } |
| class Cat : Animal{ | |
| } |
| class Cat : Animal{ | |
| func run() { | |
| print("Cat is running now") | |
| } | |
| func stop() { | |
| print("Cat has stopped now") | |
| } | |
| } |
| class Dog : Animal{ | |
| func run() { | |
| print("Dog is running now") | |
| } | |
| func stop() { | |
| print("Dog has stopped now") | |
| } | |
| } |
| protocol Animal{ | |
| func run() | |
| func stop() | |
| } | |
| protocol Eye{ | |
| func closeEyesAndSleep() | |
| func openEyesAndLookAround() | |
| } |