Choosing the right view between UILabel and UITextView to display text inside your iOS, iPadOS and macOS Catalyst App

The dilemma of choosing between UILabel and UITextView starts when you want to display text in your Apple iOS, iPadOS or macOS Catalyst App.

I have even gone through this process of choosing UILabel or UITextView to display text on my app.

So I have made a small numbered list to help you out to choose the right option…

Choose UILable to display text:

  1. If the text word count is small in number
  2. If Top Aligning text to the top border is not the requirement
  3. UILable is not tappable or interactive or selectable to the user’s input
  4. if you want to automatically adjust the font size and fit text to the UILabel bounding box layout

Here is Sample Code for UILabel:

(more…)

Continue Reading Post

When using UINavigationController in your iOS, iPadOS and macOS app sometimes you need to show/hide the navigation bar on a particular view and here is how to do it without disturbing the navigation bar hierarchy in your Main.storyboard file.

Sometimes you want to hide Navigation Bar from a particular view without manually deleting it from Main.storyboard,

So here I have documented how to do it programmatically instead.

Step 01: Copy the following code to your ViewController’s Swift file’s ‘viewWillAppear’ method for which view you want to hide Navigation Bar on its load on your iPhone, iPad or Mac’s (Catalyst) app screen.

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(true)
self.navigationController?.setNavigationBarHidden(true, animated: true)
}
(more…)

Continue Reading Post

How programmatically add Fab (Floating Action Button) Button to iPhone, iPad and Mac (Catalyst) App

When Google released Material Design Guidelines they introduced many new design elements and one of them was Fab Button i.e. Floating Action Button

Normally we see the Fab button in Android Mobile Apps but a lot of Apple iPhone, iPad and Mac App Developers has started using the Fab button in their design.

Here we will see how to add the Fab button programmatically in your iOS, iPadOS and macOS app on any view including UICollectionView or UITableView.

Step 01: First declare the UIButton variable in your View Controller

var fabButton = UIButton()

Step 02: Add this code to viewDidLoad()

(more…)

Continue Reading Post

Here is Solution if TP-Link Router is not loading some particular websites

If you are having a problem with loading or browsing particular/specific website then you can follow the below steps to resolve that problem.

Step 01: Navigate to your TP-Link router’s web interface. i.e. Normally http://192.168.0.1/

Step 02: Log in to your TP-Link router’s Administration Web Page

Step 03: Go to > Advance > Network > Internet > Click on Advanced Settings

(more…)

Continue Reading Post

User Privacy & Data Protection Standards in new Apple iPhone, iPad and Mac Operating Systems

I was planning for long time but never implemented Google Analytics for my Apple iOS Apps to get real data about my app usage. I thought it was more of work to implement analytics in app with framework using cocoa-pods which will in a way will slowdown my app performance.

But with the news of Apple is vary serious about and already is about privacy and data collection with online ads for Safari Browser on Mac and system wide privacy settings on Apple iOS 14 for iPhone. I am happy that I never implemented third party analytics framework or never added ad network to get revenue out of my apps. My apps are already paid and I don’t want to mess-up user experience with impromptu in-app advertisements.

(more…)

Continue Reading Post

How to get OTP / SMS / text messages immediately on your Mac in sync with your iPhone cellular number

Prerequisites:

1. I assume you have added your primary and same Apple ID / iCloud Account on your respective Mac and iPhone.

2. You have enabled iCloud Sync for Messages App on your iPhone and Mac in iCloud Settings.

3. You are using the latest release of macOS operating system, the latest release of iOS operating System and latest release Safari Browser.

Once above prerequisites are met we can proceed further…

Note: You can autofill security codes from your iPhone to Safari on Mac. This is Safari only feature.

To set up Text Message Forwarding on your iPhone follow below steps:

(more…)

Continue Reading Post

Here is how to still receive calls when bedtime and sleep mode (Do Not Disturb) is turned-on on your Apple iPhone and Apple Watch?

I just activated Apple iOS Bedtime feature and Apple Sleep feature for my iPhone and Apple Watch.

But you may noticed one thing once your Sleep time starts iPhone stops ringing for incoming calls.

So here is how to disable silent incoming call feature…

Step 01: Just go to you settings app on your iPhone

(more…)

Continue Reading Post

Apple Music Error [Solved] – Some items, including “Song’s Title”, were not copied to the iPhone “John Appleseed’s iPhone 11 Pro” because they could not be found.

After I started syncing my Apple Music to my iPhone via Finder app there was an error that I was getting over and over again.

The error was ‘Some items, including “Song’s Title”, were not copied to the iPhone “John Appleseed’s iPhone 11 Pro” because they could not be found.’

(more…)

Continue Reading Post

How to programmatically identify if Apple iOS (iPhone) device has a notch or safe area

Since iPhone X, Apple is releasing various sizes of iPhone with a notch.

So Identifying new iPhones that have a notch or doesn’t is a new problem for every Apple App Store App Developer. e.g. Apple has just released in 2020 with iPhone 12, Pro, Pro Max and Mini that are not similar in screen dimensions of previous generations of iPhone 11.

After reading and surfing the web I found two helpful articles on the web that will guide you to solve this problem one post was on Stack Overflow and another article by @cafielo.

But code shared in above both articles were not compatible with new Apple iOS versions 13 and 14.

So I rewrote those code that may be compatible with Apple iOS 13 and 14 operating system.

(more…)

Continue Reading Post

How conditional code for and identify device between iOS (iPhone), iPadOS (iPad) & macOS Catalyst (Apple Macintosh)

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

 
Here is how to do it.

 
Use below code to declare code specifically written and that will compile only for iOS and iPadOS.

(more…)

Continue Reading Post