SlideShare a Scribd company logo
New Features
in iOS 15 and
Swift 5.5


https://www.bacancytechnology.com/
Introduction
New Features in iOS 15 and Swift 5.5.pdf
At Worldwide Developers Conference
21, Apple has overcome many
limitations by announcing some
important features for developers.
Apple has made sure while introducing
the new features in iOS 15 and Swift 5.5
that every developer can build the best
interactive applications with minimal
time and effort. In this blog post, we
will learn a few new features that have
been introduced and see how we can
implement them in our code.

Recommended for you

Gui builder
Gui builderGui builder
Gui builder

This document provides a tutorial on how to build a simple graphical user interface (GUI) calculator application using the NetBeans IDE. It explains how to create a project, build the front end by adding labels, text fields and buttons to a JFrame container, and add functionality by writing event handlers for the buttons. The finished application allows the user to enter two numbers, click an "Add" button to calculate the sum, and view the result in a text field. It also includes buttons to clear the fields and exit the program.

Android, the life of your app
Android, the life of your appAndroid, the life of your app
Android, the life of your app

You can find the slides with speaker notes here : http://bit.ly/lifeofapp During this talk we live the life of your app on the user's point of view. The idea is to follow the user experience from the Play Store to the daily use, measure each time its frustration to find ways for us, as developers, to avoid them.

androiddevelopment
Easy job scheduling with android
Easy job scheduling with androidEasy job scheduling with android
Easy job scheduling with android

Guys Who are Passionate with their dreams....and who are interested with the Android ,Just go with this....

android training in chennaiandroid jobsandroid
New Features
in iOS 15 and
Swift 5.5
1. UISheetPresentation Controller
Apple provided some new API
improvements in WWDC 21 to present the
bottom sheets. In iOS 14, they introduced
this, but it didn’t have any customization,
but from iOS 15, we can implement apple
maps like a bottom sheet with a smaller
height. It has customization like height
adjustment, adding a grabber to the top of
the sheet.


UIViewController has a new property
called sheetPresentationController; you
can present the bottom sheet. We can
access the sheetPresentationController
property to get the instance of
UISheetPresentationController for
customizing its appearance.
@IBAction func openSheetAction(_
sender : UIButton) {
if let bSheet =
bottomSheet.sheetPresentationController
{
bSheet.detents = [.medium(),
.large()]
bSheet.prefersGrabberVisible = true
bSheet.largestUndimmedDetentIdentifie
r = .medium
bSheet.prefersScrollingExpandsWhenScr
olledToEdge = false
bSheet.preferredCornerRadius = 30.0
}
present(bottomSheet, animated: true,
completion: nil)
}
Here, we can use detents to adjust the
height of the bottom sheet. It has 2
values .large() & .medium(). .large() will
show height for full screen & .medium()
will occupy height of half of screen
height. Here, We have passed an array
for detents, so first, it will show in half
of the screen height & then we can drag
it up to the full screen.

Recommended for you

Exploring iTools
Exploring iToolsExploring iTools
Exploring iTools

This document provides an overview of the tools needed to develop iPhone applications using Apple's Xcode development environment. It explains that Xcode, Interface Builder, and the iPhone Simulator are used to design, develop, and test iPhone apps. It then demonstrates how to create a simple "Hello World" app in Xcode, including writing code to display text on the screen and setting background colors. It also describes how to run apps in the iPhone Simulator to test them without needing a physical iOS device.

apple itoolsi toolsitools
How to create_your_own_android_app
How to create_your_own_android_appHow to create_your_own_android_app
How to create_your_own_android_app

This document provides instructions for creating several apps in App Inventor, including: 1. A "Talk To Me" app that uses text-to-speech to say something when a button is pressed. 2. A "Ball Bounce" app that animates a ball bouncing around on a canvas. 3. A "Smart Employability Program Quiz" app that quizzes two players, tracks their scores, and determines a winner. The instructions include steps for designing the user interfaces and coding the app behaviors using blocks. Screenshots are provided to illustrate the block code for key functions like handling button presses, tracking scores, and determining the winner.

Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhone

Automated GUI testing of iPhone apps. Full source at http://github.com/undees/justplayed. For more on Cucumber, see http://cukes.info. From OSCON 2009

testingrubycucumber
Here, we added a grabber on top of the
sheet, so users can understand how to
drag it & drag it.
When the bottom sheet is presented, the
view behind it dims automatically; if you
want to prevent it, you can set the value
of largestUndimmedDetentIdentifier to
.medium.
bSheet.largestUndimmedDetentIdentifie
r = .medium


If your bottom sheet has scrollable
content, we can set
prefersScrollingExpandsWhenScroll
edToEdge to false so that it will
scroll without going down & using
grabber; you can drag the sheet &
show it in full screen.
bSheet.prefersScrollingExpandsWh
enScrolledToEdge = false
We can set the corner radius for the
bottom sheet also using
preferredCornerRadius.
bSheet.preferredCornerRadius =
30.0


Want to get dedicated and highly-
skilled iOS developers?
Contact the best mobile
development company: Bacancy,
to hire iOS developer and start
building brilliant mobile apps.
2. UIMenu:


iOS 14 introduced UIMenu, but if you
want to add a submenu, it was not
possible in iOS 14. So, iOS 15
introduced UIMenu with SubMenu
added to it.


Using UIMenu, we can create an
instance of the menu; it has a
parameter called children that can
take an array of UIMenu & UIAction.


UIAction takes the title, image,
attributes, state & handler as its
parameters.

Recommended for you

Angular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdfAngular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdf

This document contains summaries of 75 frequently asked Angular interview questions. It begins by defining Angular as a JavaScript framework developed by Google for building applications using web technologies like HTML, CSS, and JavaScript. It then goes on to summarize questions about setting up the Angular development environment, Angular CLI, components, data binding, directives, lifecycle hooks, and various methods for sharing data between components.

angular interview questions
Creating an Uber Clone - Part I - Transcript.pdf
Creating an Uber Clone - Part I - Transcript.pdfCreating an Uber Clone - Part I - Transcript.pdf
Creating an Uber Clone - Part I - Transcript.pdf

This is a part of an online Codename One course published around 2017 see it all for free at https://debugagent.com/series/cn1

21 android2 updated
21 android2 updated21 android2 updated
21 android2 updated

The document provides instructions on installing the Android SDK and setting up a development environment in Netbeans or Eclipse. It describes the basic building blocks of an Android application including activities, intents, services, and content providers. It also covers creating user interfaces with views and view hierarchies, handling click events, and building a simple form layout with widgets like text fields, buttons, and radio buttons.

androidashesiintroduction to android
UIMenu takes the title, image, options,
handler & other parameters. The state
in
UIAction is used to show a checkmark
to show selection.


It has 3 values .displayInline,
.destructive, .singleSelection. Using the
.singleSelection or .destructive option in
UIMenu, we can show the submenu.
When using .singleSelection It will allow
only 1 item as selected in the menu or
submenu.
@IBAction func menuAction(_ sender
: UIButton) {
let more = UIMenu(title: "More",
image: UIImage(systemName:
"ellipsis"), options: .singleSelection,
children: [
UIAction(title: "Share", image:
UIImage(systemName:
"square.and.arrow.up"), handler: { _ in
}),
UIAction(title: "Save", image:
UIImage(systemName: "folder"),
handler: { _ in }),
UIAction(title: "Edit", image:
UIImage(systemName: "pencil"),
state: .on, handler: { _ in })
])
let destruct = UIAction(title: "Delete",
image: UIImage(systemName:
"trash"), attributes: .destructive) { _
in }
let disable = UIAction(title:
"Standard", image:
UIImage(systemName: "sun.max"),
attributes: .disabled) { _ in }
btnMenu.menu = UIMenu(title:
"", children: [more, destruct, disable])
}
On long pressing the button, it shows the
menu; if you want to open the menu by
tapping the button, you can use the
property showsMenuAsPrimaryAction.


btnMenu.showsMenuAsPrimaryActi
on = true

Recommended for you

App Inventor : Getting Started Guide
App Inventor : Getting Started GuideApp Inventor : Getting Started Guide
App Inventor : Getting Started Guide

App Inventor is a program that allows users to build Android apps using a web browser. It provides two main interfaces - the Designer for selecting and arranging app components, and the Blocks Editor for programming the app's behavior visually by snapping blocks together. Users can test apps as they build them on a connected phone or emulator. App Inventor supports building many types of apps from simple games to more complex apps using phone features and services. Programming in App Inventor is intended to be approachable for non-professionals through its visual block-based programming.

appinventor
Swift
SwiftSwift
Swift

Swift is a new programming language created by Apple as an alternative to Objective-C for iOS development. It is faster, safer, and has a cleaner syntax than Objective-C. To start developing iOS apps in Swift, developers need a Mac computer, Xcode installed, and an Apple Developer account. Key aspects of iOS app development in Swift covered in the document include prototyping apps, using Xcode, optionals and auto layout, implementing protocols like UITableViewDelegate, and using MVC architecture.

swiftmobileios 8
Using android's action bar
Using android's action barUsing android's action bar
Using android's action bar

The document discusses using the Android action bar. It explains that the action bar is at the top of every activity screen and can include menu items, tabs, and other navigation elements. It provides steps for adding an action bar, including menu items, and handling clicks. It also covers splitting the action bar on narrow screens and enabling up navigation with the app icon.

3.CLLocationButton
In iOS 13, new location permission was
introduced to access it only once. So,
whenever a user tries to access the
location, it asks for permission. In iOS
15, Apple improved that feature. They
are providing location button UI by
default. So, the first time it will ask the
user for permission. Whenever users
open the app again, the user can simply
click on the location button & it will
give access to the current location
without asking for permission alert.


If the user has denied permission for
the first time, when the user clicks on
the location button next time, it will
give access to the current location
without asking for a permission alert.
Once the location access is granted, even if
the application is in the background, it will
get location data. Location data access will
expire once the user or system terminates
the app.
4.Async/Await:


Swift 5.5 introduced changes in the
concurrency system using
async/await. Concurrency means
running multiple chunks of code at
the same time. As the name suggests,
it is a way to write complex
asynchronous code if it is
synchronous. There are two steps to
perform for async/await: make a
function using the async keyword &
call it using await keyword. Async
means asynchronous; we can add it as
method attributes.
func generateRandomNumbers()
async -> [Int] {
(1...100).map { _ in
Int.random(in: 1...100)
}
}


To call this method, we need to use
await keyword ahead of the method call
& add it in an asynchronous context,
Task.

Recommended for you

Building interactive app
Building interactive appBuilding interactive app
Building interactive app

Introduction about connecting xml user interface with java code and make response to user interactions

1mac1mactalksandroid
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1

The document provides an overview of iOS app development basics including building a "Hello World" app, application architecture and states, coding in Objective-C, short message sending, storyboarding, and static table views. It discusses setting up an Xcode project, the app delegate, view controllers, windows, and application states like active, background, and suspended. It also covers Objective-C basics like properties, accessors, and blocks.

ios app developmentstoryboarding
Introducing Small Basic.pdf
Introducing Small Basic.pdfIntroducing Small Basic.pdf
Introducing Small Basic.pdf

This document provides an introduction to the Small Basic programming language environment and teaches the basics of programming through examples. It discusses that Small Basic was created to make programming easy for beginners. It then describes the Small Basic programming environment user interface and walks through a first "Hello World" program. It explains how the program works by breaking it down into statements and objects. The document continues by having the reader modify the program to print in yellow and introduces the concept of variables by having the user input their name and printing it back.

func showNumbers() {
Task{
let numbers = await
generateRandomNumbers()
print(numbers)
}
}
Before async/await was
introduced, we used closure
completion blocks, Result mostly
in Web service calls. From swift 5.5
onwards, We can use async/await
for asynchronous code without
completion handlers to return
values. We can directly assign
those values to
their respective variables. Using await
keyword in a function call will stop
further code execution until a response
comes.
To execute further code while
asynchronous code is executing, you
can keep the async keyword before the
variable & await the keyword while
accessing its result.
async let numbers =
generateRandomNumbers()
print(await numbers)
If we want to call multiple asynchronous
functions parallel, we can also do it with
async/await.
async let numbersInt =
generateRandomNumbersInt()
async let numbersDouble =
generateRandomNumbersDouble()
let numbers = await [numbersInt,
numbersDouble] as [Any]
print(numbers)


For error handling, in async/await, we
can use Result or try/catch.
let result = await
generateRandomNumbersInt()
switch result {
case .success(_):
break
case .failure(_):
break
}
do {
let result = try await
generateRandomNumbersInt()
print(result)
} catch let e {
print(e)
}

Recommended for you

Basic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdfBasic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdf

Basic Introduction Flutter Framework.pdf 2023

codedartflutter
Mobile Application Development-Designing User Interface With View
Mobile Application Development-Designing User Interface With ViewMobile Application Development-Designing User Interface With View
Mobile Application Development-Designing User Interface With View

Mobile Application Development-Designing User Interface With View

React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdfReact Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdf

The document discusses various alternatives to the React JavaScript framework for building user interfaces. It summarizes a tech talk where React experts discussed alternative frameworks. The main alternatives mentioned include Preact, Inferno JS, Backbone JS, Ember JS, and Vue JS. For each alternative, the document discusses pros and cons compared to React, including characteristics like size, performance, community support, and when each may be preferable to use over React. It provides a high-level overview of the considerations in choosing between React and its alternative frameworks.

react frameworks
5. Double & CGFloat Interchangeable
Types:


From swift 5.5, You can use Double &
CGFloat interchangeably without
converting them.
You can perform operations on Double
& CGFloat & can get the result in
Double.


let varCgFloat: CGFloat = 40
let varDouble: Double = 80
let result = varCgFloat + varDouble
print(result)
Output::
6. Lazy in the Local Context


Lazy keywords allow us to define stored
properties that will initialize when first
time used. From Swift 5.5, you can now
use the lazy keyword in the local context.
func printGreetingMethod(to: String)
-> String {
print("In printGreetingMethod()")
return "Hey, (to)"
}
func lazyInLocal() {
print("Before lazy call")
lazy var greetingLazy =
printGreetingMethod(to: "jena")
print("After lazy call")
print(greetingLazy)
}
Output:

Recommended for you

Data Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdfData Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdf

Data science has many useful applications in retail and healthcare. In retail, it allows for personalized recommendations, fraud detection, price optimization, and sentiment analysis. In healthcare, it facilitates medical imaging analysis, genomic research, drug discovery, predictive analytics, disease tracking and prevention, and monitoring through wearable devices. By analyzing customer, patient, and other relevant data, data science helps these industries better meet needs, enhance experiences and outcomes, and improve operations and decision making.

data science
How Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdfHow Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdf

The document discusses the cost of hiring Golang developers. It begins by providing context on the rise of Golang due to the growth of IoT. The cost of hiring Golang developers depends on factors like experience, location, project size, and engagement model. Hourly rates range from $18-94 in different regions, with rates generally lowest in Asia and highest in North America. Common engagement models include time and materials, fixed price, and dedicated teams. The document aims to help understand the budget needed to hire Golang talent.

hire golang developer
What’s New in Flutter 3.pdf
What’s New in Flutter 3.pdfWhat’s New in Flutter 3.pdf
What’s New in Flutter 3.pdf

Flutter 3 is now stable on macOS and Linux and supports Apple Silicon chips. Key updates include menu support for macOS, Material You design support, improved Firebase integration, foldable device support, and performance improvements for animations and image decoding. Flutter 3 also adds themes extensions and updated ad support while maintaining Flutter's mission of being an open-source, cross-platform framework.

flutter
Conclusion
With the introduction of new
features in iOS 15 and Swift 5.5, the
application development became
less challenging with more robust
outcomes. The lightweight and
straightforward syntax with
powerful pattern matching has
made development better for iOS
developers.
Thank You
https://www.bacancytechnology.com/

More Related Content

Similar to New Features in iOS 15 and Swift 5.5.pdf

Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
veeracynixit
 
Project two c++ tutorial
Project two c++ tutorialProject two c++ tutorial
Project two c++ tutorial
Babatunde Salaam
 
Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月
Eihiro Saishu
 
Gui builder
Gui builderGui builder
Gui builder
learnt
 
Android, the life of your app
Android, the life of your appAndroid, the life of your app
Android, the life of your app
Eyal Lezmy
 
Easy job scheduling with android
Easy job scheduling with androidEasy job scheduling with android
Easy job scheduling with android
kirubhakarans2
 
Exploring iTools
Exploring iToolsExploring iTools
Exploring iTools
www.netgains.org
 
How to create_your_own_android_app
How to create_your_own_android_appHow to create_your_own_android_app
How to create_your_own_android_app
Charo Cuart
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhone
Erin Dees
 
Angular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdfAngular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdf
JohnLeo57
 
Creating an Uber Clone - Part I - Transcript.pdf
Creating an Uber Clone - Part I - Transcript.pdfCreating an Uber Clone - Part I - Transcript.pdf
Creating an Uber Clone - Part I - Transcript.pdf
ShaiAlmog1
 
21 android2 updated
21 android2 updated21 android2 updated
21 android2 updated
GhanaGTUG
 
App Inventor : Getting Started Guide
App Inventor : Getting Started GuideApp Inventor : Getting Started Guide
App Inventor : Getting Started Guide
Vasilis Drimtzias
 
Swift
SwiftSwift
Swift
Larry Ball
 
Using android's action bar
Using android's action barUsing android's action bar
Using android's action bar
Danilo Freitas de Souza
 
Building interactive app
Building interactive appBuilding interactive app
Building interactive app
Omar Albelbaisy
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1
Hussain Behestee
 
Introducing Small Basic.pdf
Introducing Small Basic.pdfIntroducing Small Basic.pdf
Introducing Small Basic.pdf
Snehlata Parashar
 
Basic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdfBasic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdf
PhanithLIM
 
Mobile Application Development-Designing User Interface With View
Mobile Application Development-Designing User Interface With ViewMobile Application Development-Designing User Interface With View
Mobile Application Development-Designing User Interface With View
Chandrakant Divate
 

Similar to New Features in iOS 15 and Swift 5.5.pdf (20)

Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
 
Project two c++ tutorial
Project two c++ tutorialProject two c++ tutorial
Project two c++ tutorial
 
Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月
 
Gui builder
Gui builderGui builder
Gui builder
 
Android, the life of your app
Android, the life of your appAndroid, the life of your app
Android, the life of your app
 
Easy job scheduling with android
Easy job scheduling with androidEasy job scheduling with android
Easy job scheduling with android
 
Exploring iTools
Exploring iToolsExploring iTools
Exploring iTools
 
How to create_your_own_android_app
How to create_your_own_android_appHow to create_your_own_android_app
How to create_your_own_android_app
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhone
 
Angular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdfAngular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdf
 
Creating an Uber Clone - Part I - Transcript.pdf
Creating an Uber Clone - Part I - Transcript.pdfCreating an Uber Clone - Part I - Transcript.pdf
Creating an Uber Clone - Part I - Transcript.pdf
 
21 android2 updated
21 android2 updated21 android2 updated
21 android2 updated
 
App Inventor : Getting Started Guide
App Inventor : Getting Started GuideApp Inventor : Getting Started Guide
App Inventor : Getting Started Guide
 
Swift
SwiftSwift
Swift
 
Using android's action bar
Using android's action barUsing android's action bar
Using android's action bar
 
Building interactive app
Building interactive appBuilding interactive app
Building interactive app
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1
 
Introducing Small Basic.pdf
Introducing Small Basic.pdfIntroducing Small Basic.pdf
Introducing Small Basic.pdf
 
Basic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdfBasic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdf
 
Mobile Application Development-Designing User Interface With View
Mobile Application Development-Designing User Interface With ViewMobile Application Development-Designing User Interface With View
Mobile Application Development-Designing User Interface With View
 

More from Katy Slemon

React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdfReact Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
Katy Slemon
 
Data Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdfData Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdf
Katy Slemon
 
How Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdfHow Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdf
Katy Slemon
 
What’s New in Flutter 3.pdf
What’s New in Flutter 3.pdfWhat’s New in Flutter 3.pdf
What’s New in Flutter 3.pdf
Katy Slemon
 
Why Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdfWhy Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdf
Katy Slemon
 
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdfHow Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
Katy Slemon
 
How to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdfHow to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdf
Katy Slemon
 
How to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdfHow to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdf
Katy Slemon
 
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdfSure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Katy Slemon
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfHow to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdf
Katy Slemon
 
IoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdfIoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdf
Katy Slemon
 
Understanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfUnderstanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdf
Katy Slemon
 
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdfThe Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
Katy Slemon
 
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdfHow to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
Katy Slemon
 
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdfChoose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Katy Slemon
 
Flutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdfFlutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdf
Katy Slemon
 
Angular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdfAngular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdf
Katy Slemon
 
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdfHow to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
Katy Slemon
 
Ruby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdfRuby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdf
Katy Slemon
 
Uncovering 04 Main Types and Benefits of Salesforce ISV Partnerships.pdf
Uncovering 04 Main Types and Benefits of Salesforce ISV Partnerships.pdfUncovering 04 Main Types and Benefits of Salesforce ISV Partnerships.pdf
Uncovering 04 Main Types and Benefits of Salesforce ISV Partnerships.pdf
Katy Slemon
 

More from Katy Slemon (20)

React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdfReact Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
 
Data Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdfData Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdf
 
How Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdfHow Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdf
 
What’s New in Flutter 3.pdf
What’s New in Flutter 3.pdfWhat’s New in Flutter 3.pdf
What’s New in Flutter 3.pdf
 
Why Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdfWhy Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdf
 
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdfHow Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
 
How to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdfHow to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdf
 
How to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdfHow to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdf
 
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdfSure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfHow to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdf
 
IoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdfIoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdf
 
Understanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfUnderstanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdf
 
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdfThe Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
 
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdfHow to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
 
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdfChoose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
 
Flutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdfFlutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdf
 
Angular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdfAngular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdf
 
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdfHow to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
 
Ruby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdfRuby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdf
 
Uncovering 04 Main Types and Benefits of Salesforce ISV Partnerships.pdf
Uncovering 04 Main Types and Benefits of Salesforce ISV Partnerships.pdfUncovering 04 Main Types and Benefits of Salesforce ISV Partnerships.pdf
Uncovering 04 Main Types and Benefits of Salesforce ISV Partnerships.pdf
 

Recently uploaded

Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
Enterprise Wired
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 

Recently uploaded (20)

Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 

New Features in iOS 15 and Swift 5.5.pdf

  • 1. New Features in iOS 15 and Swift 5.5 https://www.bacancytechnology.com/
  • 4. At Worldwide Developers Conference 21, Apple has overcome many limitations by announcing some important features for developers. Apple has made sure while introducing the new features in iOS 15 and Swift 5.5 that every developer can build the best interactive applications with minimal time and effort. In this blog post, we will learn a few new features that have been introduced and see how we can implement them in our code.
  • 5. New Features in iOS 15 and Swift 5.5
  • 6. 1. UISheetPresentation Controller Apple provided some new API improvements in WWDC 21 to present the bottom sheets. In iOS 14, they introduced this, but it didn’t have any customization, but from iOS 15, we can implement apple maps like a bottom sheet with a smaller height. It has customization like height adjustment, adding a grabber to the top of the sheet. UIViewController has a new property called sheetPresentationController; you can present the bottom sheet. We can access the sheetPresentationController property to get the instance of UISheetPresentationController for customizing its appearance.
  • 7. @IBAction func openSheetAction(_ sender : UIButton) { if let bSheet = bottomSheet.sheetPresentationController { bSheet.detents = [.medium(), .large()] bSheet.prefersGrabberVisible = true bSheet.largestUndimmedDetentIdentifie r = .medium bSheet.prefersScrollingExpandsWhenScr olledToEdge = false bSheet.preferredCornerRadius = 30.0 } present(bottomSheet, animated: true, completion: nil) }
  • 8. Here, we can use detents to adjust the height of the bottom sheet. It has 2 values .large() & .medium(). .large() will show height for full screen & .medium() will occupy height of half of screen height. Here, We have passed an array for detents, so first, it will show in half of the screen height & then we can drag it up to the full screen.
  • 9. Here, we added a grabber on top of the sheet, so users can understand how to drag it & drag it. When the bottom sheet is presented, the view behind it dims automatically; if you want to prevent it, you can set the value of largestUndimmedDetentIdentifier to .medium.
  • 10. bSheet.largestUndimmedDetentIdentifie r = .medium If your bottom sheet has scrollable content, we can set prefersScrollingExpandsWhenScroll edToEdge to false so that it will scroll without going down & using grabber; you can drag the sheet & show it in full screen. bSheet.prefersScrollingExpandsWh enScrolledToEdge = false
  • 11. We can set the corner radius for the bottom sheet also using preferredCornerRadius. bSheet.preferredCornerRadius = 30.0 Want to get dedicated and highly- skilled iOS developers? Contact the best mobile development company: Bacancy, to hire iOS developer and start building brilliant mobile apps.
  • 12. 2. UIMenu: iOS 14 introduced UIMenu, but if you want to add a submenu, it was not possible in iOS 14. So, iOS 15 introduced UIMenu with SubMenu added to it. Using UIMenu, we can create an instance of the menu; it has a parameter called children that can take an array of UIMenu & UIAction. UIAction takes the title, image, attributes, state & handler as its parameters.
  • 13. UIMenu takes the title, image, options, handler & other parameters. The state in UIAction is used to show a checkmark to show selection. It has 3 values .displayInline, .destructive, .singleSelection. Using the .singleSelection or .destructive option in UIMenu, we can show the submenu. When using .singleSelection It will allow only 1 item as selected in the menu or submenu.
  • 14. @IBAction func menuAction(_ sender : UIButton) { let more = UIMenu(title: "More", image: UIImage(systemName: "ellipsis"), options: .singleSelection, children: [ UIAction(title: "Share", image: UIImage(systemName: "square.and.arrow.up"), handler: { _ in }), UIAction(title: "Save", image: UIImage(systemName: "folder"), handler: { _ in }), UIAction(title: "Edit", image: UIImage(systemName: "pencil"), state: .on, handler: { _ in }) ])
  • 15. let destruct = UIAction(title: "Delete", image: UIImage(systemName: "trash"), attributes: .destructive) { _ in } let disable = UIAction(title: "Standard", image: UIImage(systemName: "sun.max"), attributes: .disabled) { _ in } btnMenu.menu = UIMenu(title: "", children: [more, destruct, disable]) }
  • 16. On long pressing the button, it shows the menu; if you want to open the menu by tapping the button, you can use the property showsMenuAsPrimaryAction. btnMenu.showsMenuAsPrimaryActi on = true
  • 17. 3.CLLocationButton In iOS 13, new location permission was introduced to access it only once. So, whenever a user tries to access the location, it asks for permission. In iOS 15, Apple improved that feature. They are providing location button UI by default. So, the first time it will ask the user for permission. Whenever users open the app again, the user can simply click on the location button & it will give access to the current location without asking for permission alert. If the user has denied permission for the first time, when the user clicks on the location button next time, it will give access to the current location
  • 18. without asking for a permission alert. Once the location access is granted, even if the application is in the background, it will get location data. Location data access will expire once the user or system terminates the app.
  • 19. 4.Async/Await: Swift 5.5 introduced changes in the concurrency system using async/await. Concurrency means running multiple chunks of code at the same time. As the name suggests, it is a way to write complex asynchronous code if it is synchronous. There are two steps to perform for async/await: make a function using the async keyword & call it using await keyword. Async means asynchronous; we can add it as method attributes.
  • 20. func generateRandomNumbers() async -> [Int] { (1...100).map { _ in Int.random(in: 1...100) } } To call this method, we need to use await keyword ahead of the method call & add it in an asynchronous context, Task.
  • 21. func showNumbers() { Task{ let numbers = await generateRandomNumbers() print(numbers) } } Before async/await was introduced, we used closure completion blocks, Result mostly in Web service calls. From swift 5.5 onwards, We can use async/await for asynchronous code without completion handlers to return values. We can directly assign those values to
  • 22. their respective variables. Using await keyword in a function call will stop further code execution until a response comes. To execute further code while asynchronous code is executing, you can keep the async keyword before the variable & await the keyword while accessing its result. async let numbers = generateRandomNumbers() print(await numbers)
  • 23. If we want to call multiple asynchronous functions parallel, we can also do it with async/await. async let numbersInt = generateRandomNumbersInt() async let numbersDouble = generateRandomNumbersDouble() let numbers = await [numbersInt, numbersDouble] as [Any] print(numbers) For error handling, in async/await, we can use Result or try/catch.
  • 24. let result = await generateRandomNumbersInt() switch result { case .success(_): break case .failure(_): break } do { let result = try await generateRandomNumbersInt() print(result) } catch let e { print(e) }
  • 25. 5. Double & CGFloat Interchangeable Types: From swift 5.5, You can use Double & CGFloat interchangeably without converting them. You can perform operations on Double & CGFloat & can get the result in Double. let varCgFloat: CGFloat = 40 let varDouble: Double = 80 let result = varCgFloat + varDouble print(result)
  • 26. Output:: 6. Lazy in the Local Context Lazy keywords allow us to define stored properties that will initialize when first time used. From Swift 5.5, you can now use the lazy keyword in the local context.
  • 27. func printGreetingMethod(to: String) -> String { print("In printGreetingMethod()") return "Hey, (to)" } func lazyInLocal() { print("Before lazy call") lazy var greetingLazy = printGreetingMethod(to: "jena") print("After lazy call") print(greetingLazy) }
  • 30. With the introduction of new features in iOS 15 and Swift 5.5, the application development became less challenging with more robust outcomes. The lightweight and straightforward syntax with powerful pattern matching has made development better for iOS developers.