Category: iOS

iOS (formerly iPhone OS) is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that powers many of the company’s mobile devices, including the iPhone and iPod Touch; the term also included the versions running on iPads until the name iPadOS was introduced with version 13 in 2019. It is the world’s second-most widely installed mobile operating system, after Android. It is the basis for three other operating systems made by Apple: iPadOS, tvOS, and watchOS. It is proprietary software, although some parts of it are open source under the Apple Public Source License and other licenses.

  • SwiftUI for Flutter developer – Video 1

    As a flutter developer, there are not many things you can do on Xcode since Flutter itself builds everything for you but why not learn some app development with Swift and Xcode.

    Swift is a deep and large language and I find it complex, when I learned Objective-C back in 2010 with Xcode 3.x that was very hard to start but later it became easy for me.

    Today there is no reason to start learning Objective-C over Swift unless you have a specific interest.

    For Flutter developers, if flutter is your first mobile framework and dart is the first language you may find Swift is complex and hard to start but the idea behind all the languages is the same you just have to learn the syntax. Of course, some languages have specific features for some reasons.

    I have a series of videos for Flutter developers who want to learn Swift App Development with Xcode. For running Xcode you just need a Mac computer. Running Xcode on any Mac will work, most of the time you don’t need a very powerful Mac.

    I’m very new to making videos and teaching programming to others, if you find anything wrong, just let me know in the comments. Also if you can subscribe to my channel and like the video, I’m gonna appreciate that.

    So this is the first video, there going to be a few more videos. We are going to make an app with a login page and list page. We also going to use some APIs which also we are going to make ourselves in PHP.

    https://www.youtube.com/watch?v=f4kXQBsZBoI
    Spread the love
  • How to change the status bar color in Flutter, Android only

    Changing the status bar color is very easy in Flutter. There are a few ways to do this.

    1. Globally in the main function
    import 'package:flutter/services.dart';
    
    void main() {
    
      SystemChrome.setSystemUIOverlayStyle(
        SystemUiOverlayStyle(
          statusBarColor: Colors.red,
        ),
      );
    
      runApp(
        MyApp()
      );
    }

    2. Globally in the MaterialApp widget in ThemeData

    return MaterialApp(
          title: 'FlutterFramework',
          debugShowCheckedModeBanner: false,
          themeMode: ThemeMode.light,
          theme: ThemeData(
            primaryColor: Colors.red,
            appBarTheme: AppBarTheme(
              systemOverlayStyle: SystemUiOverlayStyle(
                statusBarColor: Colors.red,
              ),
            ),
          ),
    );

    3. AppBar only

    AppBar(
      systemOverlayStyle: SystemUiOverlayStyle(
        statusBarColor: Colors.red,
      ),
    )

    Spread the love
  • Create local notification in Swift

    Create local notification in Swift

    Create local notification in Swift

    To create a local notification in Swift, you will need to use the UserNotifications framework. Here is an example of how to do this:

    import UserNotifications
    
    // Create the notification content
    let content = UNMutableNotificationContent()
    content.title = "Title of your notification"
    content.body = "Body of your notification"
    
    // Set the trigger for the notification
    let date = Date().addingTimeInterval(10) // 10 seconds from now
    let dateComponents = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute, .second], from: date)
    let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: false)
    
    // Create the request for the notification
    let request = UNNotificationRequest(identifier: "YourNotificationIdentifier", content: content, trigger: trigger)
    
    // Add the request to the notification center
    UNUserNotificationCenter.current().add(request) { (error) in
        if let error = error {
            print("Error adding notification request: \(error)")
        }
    }
    

    This code will create a notification that will be triggered 10 seconds from the time it is added to the notification center. When the notification is triggered, it will display the title and body that you set in the content object.

    Spread the love