Skip to main content

Around2Me – Instantly Discover Nearby Essentials

In today’s fast-paced world, finding what you need — exactly when you need it — should be effortless. That’s where Around2Me comes in. Whether you're navigating a new city, running errands, or just looking for a bite nearby, Around2Me helps you instantly find nearby essentials like ATMs, restaurants, hospitals, gas stations , and much more. Around2Me 🚀 What Makes Around2Me Different? Unlike many location-based apps that are bloated with unnecessary features or force users to sign up, Around2Me is lightweight, private, and instant . Here's how: 📍 Location-Based Discovery The app instantly detects your current location and shows you relevant nearby places — from pharmacies to petrol pumps, cafes to banks. 🗺️ Map Integration Tap any place to view it on the map and get turn-by-turn directions in seconds. 🧩 Clean Categories Looking for something specific? Use quick-access filters like Hospitals , ATMs , Coffee Shops , or Parking . 🔐 No Signups, No Data Collection ...

Design Patterns on iOS using Swift

Design Patterns on iOS using Swift - Singleton Design Pattern Example


iOS Design Patterns Tutorial - Design patterns are evolved as reusable solution to the problem that we encounter every day of programming

Types of Design Patterns - iOS Developer Live

Creational: This type design deals with the object creation and initialization.
   Eg: Singleton, Factory, Abstract Factory.

Structural: This type design pattern deals with class and object composition
Eg: MVC, Decorator, Adapter, Bridge, Facade.

Behavioral: Deals with the communication between classes and object
   Eg: Observer, and, Memento

Singleton Design Pattern


Creational Pattern - Singleton Design Patterns

Creational Pattern - Only one Instance of a particular classes, singleton pattern belongs to Ceational type pattern, This pattern is used when we need to ensure that only one object of a particular class need to be created. Only one object available across the application in a controlled 
  1. Declaring all constructor of the class to be private
  2. Provide static method that return a reference to the instance.
  3. The instance to be stored as a private static variable   

Example:-

class singaltonDemo
{
    static let instance = singaltonDemo()
    var data: Int = 0
    private init(){
        
    }
    
     func setData(value: Int){
         data = value
         
     }
    func getData() ->Int {
        return data
    }
}

singaltonDemo.instance.setData(10)
print("Data = \(singaltonDemo.instance.getData())")



Comments

Post a Comment