Technology Blog

Look deep into latest news and innovations happening in the Tech industry with our highly informational blog.

What’s new in iOS 14

hkis

Apple in June 2020 introduced the latest version of its iOS operating system, iOS 14, which is set to be released this fall. iOS 14 is one of Apple’s biggest iOS updates to date, introducing Home screen design changes, major new features, updates for existing apps, Siri improvements, and many other tweaks that streamline the iOS interface.

First and foremost, iOS 14 brings a redesigned Home Screen that includes support for widgets for the first time. Widgets can be dragged from the Today view right onto the Home Screen and can be pinned in different sizes.

With a Smart Stack feature, the iPhone can use on-device intelligence to surface the right widget based on time, location, and activity. Each Home Screen page can display widgets customized for work, travel, sports, and more. The Today section where widgets are housed has also been redesigned, and there’s a widget gallery where users can choose new widgets from apps and customize those widgets.

Swiping all the way to the end of the app pages on an iPhone opens the new App Library, which is an interface that shows all of the apps on your iPhone to see everything at a glance. Apps are organized into your folder system, but there are also Apple-created folders like Suggestions and Apple Arcade that intelligently surface apps. New app downloads can be added to your Home Screen or kept in the App Library to keep your Home Screen cleaner.

New space-saving measures mean incoming phone calls and Siri requests no longer take over the entire screen. Phone calls (and FaceTime/VoIP calls) show up in a small banner on the iPhone’s display while activating Siri shows a small animated Siri icon at the bottom of the screen.

With a Picture in Picture mode, users can watch videos or talk on FaceTime while also using other apps at the same time, with FaceTime or a video playing in a small window that can be resized and relocated to any corner of the iPhone’s screen.

Siri is smarter in iOS 14 and can answer a greater range of questions with info pulled from across the internet, and Siri can also send audio messages. Keyboard dictation runs on the device, adding an additional layer of privacy for dictated messages.

Apple added App Clips to iOS 14, letting users take advantage of some app features without needing to download the full app. App Clips can let you do things like rent a scooter, purchase a coffee, make a restaurant reservation, or fill a parking meter just by scanning a code, with no need to download a full app.

Apple describes App Clips as just a “small part of an app experience” designed to be found in the moment it is needed. App Clips work through Apple-designed App Clip codes, NFC tags, or QR codes, and can also be shared in Messages or from Safari.

Let’s take a look at iOS 14’s new UIPageControl

  • Background style
  • Custom indicator image
  • Custom indicator image at a specific index
  • Infinite pages (new scrubbing behavior)

Background Style

We have a new styling option for our UIPageControl called BackgroundStyle. This is an enum with three values:

@available(iOS 14.0, *)
 public enum BackgroundStyle : Int {
/// The default background style that adapts based on the current interaction state.
 case automatic = 0
 /// The background style that shows a full background regardless of the interaction
 case prominent = 1
  /// The background style that shows a minimal background regardless of the interaction
 case minimal = 2
 }

The usage is quite simple. By default, it is minimal:

pageControl.backgroundStyle = .prominent

Note: When an interaction state is continuous, the background style changes automatically if you set backgroundStyle to automatic. I discuss interaction APIs later in this article.

Prominent style (new)
Pic courtesy: medium.com

Minimal style (old)
Pic courtesy: medium.com

Custom Indicator Image

Apple has introduced a new API to set a custom icon or image to our UIPageControl compared to the old circular icon.

I remember a lot of effort was dedicated to achieving this by writing a custom UIPageControl class. The property name is below:

/// The preferred image for indicators. Symbol images are recommended. Default is nil.
 @available(iOS 14.0, *)
 open var preferredIndicatorImage: UIImage?

The usage is quite simple. I have used SF Symbol for this demo:

pageControl.preferredIndicatorImage = UIImage.init(systemName: "heart.fill")

Pic courtesy: medium.com

Custom Indicator Image at Specific Index

/**
 * @abstract Returns the override indicator image for the specific page, nil if no override image was set.
 * @param page Must be in the range of 0..numberOfPages
 */
 @available(iOS 14.0, *)
 open func indicatorImage(forPage page: Int) -> UIImage?

Do you remember the Yahoo Weather app that came pre-installed in your iPhone? It has the UIPageControl below where the first icon is a location icon that denotes the current location. The interesting part is they had this control from the very beginning. I always used to think about the implementation and effort required just to achieve this.

Yahoo Weather app UIPageControl screenshot
Pic courtesy: medium.com

Yahoo Weather app UIPageControl screenshot

Now it’s a piece of cake because iOS 14 has given us a new API with which you can set a custom icon for each index of your UIPageControl.

I have used SF Symbol for this demo:

pageControl.setIndicatorImage(UIImage.init(systemName: "location.fill"),
 forPage: 0)

Pic courtesy: medium.com

Just imagine the customization you can do with the power to set each icon and the user experience you can give to our user.

Below is an example where a custom icon is set to page control based on different rainy weather conditions.

Pic courtesy: medium.com

Infinite Pages (New Scrubbing Behavior)

With the new UIPageControl, you can set an infinite number of pages. Well, don’t create infinitely… but how cool is that?

The usage is quite simple. I have set it to 400 here for this demo:

pageControl.numberOfPages = 400

Prior to iOS 14, we could set any number of pages. So what did Apple do this year to improve scenarios like this?

Well, it has introduced a new API and completely new UX for handling this very issue.

Apple has provided a custom interaction for our new UIPageControl in iOS14 called InteractionState. It is an enum with two interaction types:

  • Discrete
  • Continuous

In iOS 14, the default value of UIPageControl’s interaction is continuous:

@available(iOS 14.0, *)
 public enum InteractionState : Int {
 /// The default interaction state, where no interaction has occured.
 case none = 0
 /// The interaction state for which the page was changed via a single, discrete interaction.
 case discrete = 1
 /// The interaction state for which the page was changed via a continuous interaction.
 case continuous = 2
 }
 

You can change the interaction state to discrete by setting the property below to false:

/// Returns YES if the continuous interaction is enabled, NO otherwise. Default is YES.
 @available(iOS 14.0, *)
 open var allowsContinuousInteraction: Bool

You can also add an observer to change the value of the interactionState property and check the current interaction state with the property below:

/// The current interaction state for when the current page changes. Default is UIPageControlInteractionStateNone
 @available(iOS 14.0, *)
 open var interactionState: UIPageControl.InteractionState { get }

Below, I have shared GIFs of these two types of interactions. You can see that continuous interaction helps us to reach any index of our UIPageControl with a drag behavior. For the discrete interaction, we tap on it and we move to the next index one by one.

Discrete interaction
Pic courtesy: medium.com

Discrete interaction
Pic courtesy: medium.com

For more information and to develop iOS Mobile Apps, Hire iOS Developer from us as we give you a high-quality product by utilizing all the latest tools and advanced technology. E-mail us any clock at – hello@hkinfosoft.com or Skype us: “hkinfosoft”. To develop iOS Mobile Apps, please visit our technology page.

Content Source:

  1. medium.com
  2. macrumors.com