Mandar Apte

UI/UX Designer from Mumbai, Maharashtra, India.

Articles

  • Repair User Home Folder Permissions for Mac

    I will explain how to repair your Mac’s Home Folder Permissions. This will fix any annoying repeated Finder, iTunes / Music, or application issues on your Mac.

    Follow these steps to reset permissions:

    Step 01:
    Turn on or restart your Mac and immediately press and hold ‘Command (⌘) R’ to start up from macOS Recovery.

    Step 02:
    Enter the firmware password or administrator password if prompted on your Mac.

    Step 03:
    Choose Utilities > Terminal from the menu bar when you see the macOS Utilities window.

    (more…)
  • Programmatically identify device type iOS, iPadOS & macOS Catalyst.

    If you are developing a macOS catalyst app, you may be wondering how to conditionally write code specifically for iOS, iPad OS, or the macOS 10.15 catalyst app.

    Here is how to do it.

    Use the code below to declare specifically written code, which will compile only for iOS and iPadOS.

    (more…)
  • Set UINavigation Bar Large Title Text Foreground Colour.

    Here is how to set UINavigation Bar Large Title Text Colour (Foreground Colour) in iOS 11, 12, 13 and above,

    Declare Navigation Bar Title Text & Large Title Settings like this in your View Controller’s ViewDidLoad() Method:

    self.navigationItem.title = "Home"
    self.navigationController?.navigationBar.prefersLargeTitles = true
    self.navigationController?.navigationItem.largeTitleDisplayMode = .automatic
    

    Now write the below line inside ViewDidLoad() to get the Large Title Foreground colour as White Colour like this:

    (more…)
  • Cloudflare Flexible SSL Certificate Implementation Guide for WordPress Website.

    Prerequisite:
    Please ensure you have an active CloudFlare account and have added your WordPress Website to CloudFlare. Also, make sure you are using CloudFlare nameservers for your domain.

    Step 01:
    Sign in to your CloudFlare account

    Step 02:
    Make sure a flexible SSL certificate is enabled under the “Crypto” tab for your selected website

    Step 03:
    While signing in to your CloudFlare account, go to > My Profile, Scroll down to API Keys, locate the Global API Key, and copy the key for further use inside your website.

    (more…)
  • Set UIImageView Image Inset for iOS and iPadOS app.

    Here is an example if you want to inset UIImageView so that the image does not fit edge to edge of the UIImageView

    Note:
    The latest version of Xcode & Latest version of Swift Programming Language is preferred.

    Here is step by step procedure to achieve the designed result:

    Step 01:
    Create Apple iOS Project in Xcode. Add UIImageView to View Controller in Storyboard.

    Step 02:
    Now Connect that UIImageView to the View Controller Swift File. It will look something like this.

    @IBOutlet weak var imageView: UIImageView!
    

    Step 03:
    Now add the following code in the ViewDidLoad Function of your View Controller File.

    (more…)
  • Animate tab bar switches with a transition effect for UITabBarViewController.

    I was searching the web for answers on how to give the CurlUp / CrossDissolve / FlipFromRight / FlipFromLeft / CurlDown / FlipFromTop / FlipFromBottom transition effect for the UITabBar Tab Switch.

    I found this answer, but it has a bug or a black screen when you tap on the same tab twice, i.e., the destination and current tab are the same.

    So I solve this issue with my logic and additional if and else statement.

    So here is the final answer without any bugs.

    Step 01:
    Add these two classes as Super Class to your UITabBarViewController

    UITabBarController, UITabBarControllerDelegate
    

    Step 02:
    Now add the following code to your viewDidLoad Function in your UITabBarViewController

    self.delegate = self
    
    (more…)
  • Hide the Navigation Bar on Scroll.

    Assumption:
    I assume you have embedded UINavigationBar inside your Apple iOS app on Storyboard.

    If you want to mimic the behaviour of the Apple Safari iOS App, such as hiding the navigation bar on the scroll, you can do it in just a single line of code without any hassle.

    You have to add the following code in your View Controller’s viewDidAppear function where you have added UINavigationBar in the Storyboard:

    (more…)
  • Programmatically change the UITabBar Tint Color and the UITabBar Item selected and unselected icon tint color.

    Assumption:
    I assume you have deployed UITabBarViewController in your iOS App. Now you want to change the Tint color of the UITabBar, the Tint color of the UITabBar item, and the tint color of the UITabBar’s unselected icon.

    Doing this is just as simple as a single line of code.

    The code below will go to your Apple iOS app’s AppDelegate.swift file under the ‘didFinishLaunchingWithOptions’ function.

    So your code will look something like this.

    (more…)
  • Programmatically set the icon/image for the Tab Bar Item in UITabBarViewController.

    Assumptions:
    I assume you have already embedded in UITabBarViewController for your ViewController in Interface Builder. You also have three tab bar items with individual view controllers and created image assets with your icons.

    Copy the following code using your current View Controller’s ViewdidLoad method.

    (more…)
  • Programmatically change the titles of tabs in UITabBarViewController. Change the title of the Navigation Bar for each UITabBarViewController.

    Let’s assume you use Tab Bar View Controller in your Xcode Project.

    You have embedded in your view controller with UITabBarViewController.

    Say you are using 3 Tab Views.

    In Swift programming Language, number counting starts with 0, so you will write code like this in your respective view controller’s viewDidLoad function.

    (more…)