Exploring Top Features in iOS 16, 17, and 18: A Complete Guide (Part 2)
Apple’s iOS updates from versions 17 to 18, rolled out between 2023 and 2024, have transformed the iPhone into a smarter, more accessible, and user-friendly device.
These updates bring a range of features that boost productivity, enhance security, and make the iPhone more inclusive, from interactive widgets to AI-powered tools and innovative accessibility options.
In Part 2 of this guide, we’ll dive into the standout features of iOS 17 and 18, complete with code examples.
iOS 17: Making iPhones Smarter and More Accessible
Released on September 18, 2023, iOS 17 focused on smarter interaction, better accessibility, and smoother development tools.
🔞 Sensitive Content Analysis: Safer Viewing
iOS 17 takes Communication Safety a step further by using on-device intelligence to detect sensitive content (like nudity or graphic violence) in photos and videos. Instead of displaying it immediately, your iPhone shows a blurred preview with a warning, letting you choose whether to view it. Crucially, all analysis is done privately on the device — no images are shared with Apple or anyone else.
This feature is especially useful for parents, schools, or anyone looking for more control over unexpected content in Messages or AirDrop.
🛠 How to Implement
Below is a basic implementation using SCSensitivityAnalyzer to classify an image and update the UI based on the result:
enum AnalysisState {
case notStarted
case analyzing
case isSensitive
case notSensitive
case error(message: String)
}
func analyze(image: UIImage) async {
analysisState = .analyzing
let analyzer = SCSensitivityAnalyzer()
let policy = analyzer.analysisPolicy
if policy == .disabled {
print("Policy is disabled")
analysisState = .error(message: "Policy is disabled")
return
}
do {
let response = try await analyzer.analyzeImage(image.cgImage!)
print(response.description)
print(response.isSensitive)
analysisState = if response.isSensitive {
.isSensitive
} else {
.notSensitive
}
} catch {
analysisState = .error(message: error.localizedDescription)
print("Unable to get a response", error)
}
}🌈 PhaseAnimator: Multi-Step Animations
Introduced in iOS 17, PhaseAnimator lets developers create multi-stage animations in SwiftUI. That means you can animate views through different visual “phases” — like scaling, rotating, or glowing — to make interfaces feel more dynamic and responsive. It’s perfect for things like pulsing buttons, attention-grabbing icons, or even animated feedback when an action completes.
🛠 How to Implement
Below is a SwiftUI example that animates a UI element through four phases using PhaseAnimator:
import SwiftUI
struct ContentView: View {
@State var isAnimated: Bool = false
private enum AnimationPhase: CaseIterable {
case initial
case expand
case rotate
case glow
var scale: CGFloat {
switch self {
case .initial: return 1.0
case .expand: return 1.1
case .rotate: return 1.05
case .glow: return 1.0
}
}
var rotation: Angle {
switch self {
case .initial: return .degrees(0)
case .expand: return .degrees(0)
case .rotate: return .degrees(45)
case .glow: return .degrees(0)
}
}
var backgroundColor: Color {
switch self {
case .initial: return .blue.opacity(0.7)
case .expand: return .purple.opacity(0.7)
case .rotate: return .pink.opacity(0.7)
case .glow: return .cyan.opacity(0.9)
}
}
var shadowRadius: CGFloat {
switch self {
case .initial: return 5
case .expand: return 10
case .rotate: return 8
case .glow: return 20
}
}
}
var body: some View {
ZStack {
VStack {
Color.white
.overlay {
Image("Image")
.resizable()
.scaledToFill()
.ignoresSafeArea()
}
}
.clipped()
VStack {
HStack {
Text("Text")
.font(.headline)
.foregroundColor(.white)
Spacer()
Button(action: {
print("Button")
isAnimated.toggle()
}) {
Image(systemName: "star.circle.fill")
.foregroundColor(.white)
.font(.title2)
}
}
.padding()
.padding(.vertical, 20)
.padding(.horizontal, 30)
}
.background {
Color.clear
.phaseAnimator(AnimationPhase.allCases, trigger: isAnimated) { content, phase in
content
.background(phase.backgroundColor)
.scaleEffect(phase.scale)
.rotationEffect(phase.rotation)
.shadow(radius: phase.shadowRadius)
} animation: { phase in
switch phase {
case .initial:
return .easeInOut(duration: 0.4)
case .expand:
return .spring(response: 0.5, dampingFraction: 0.6)
case .rotate:
return .spring(response: 0.4, dampingFraction: 0.7)
case .glow:
return .easeOut(duration: 0.6)
}
}
}
}
}
}🔍 MagnifyGesture: Smoother Pinch-to-Zoom
Introduced as a modern replacement for MagnificationGesture, MagnifyGesture gives developers finer control and smoother behavior for pinch-to-zoom interactions in SwiftUI. Whether you’re building a photo gallery, map view, or any zoomable content, this modifier improves responsiveness and feel.
🛠 How to Implement
Below is a simple implementation of MagnifyGesture with scale limits and smooth animation:
Image(uiImage: image)
.resizable()
.scaledToFit()
.frame(maxWidth: .infinity, maxHeight: 400)
.scaleEffect(viewModel.scale)
.gesture(
// Use MagnifyGesture as a fallback if magnifyGesture is unavailable
MagnifyGesture()
.onChanged { value in
// Update scale during gesture, limiting to 0.5–5.0
viewModel.scale = max(0.5, min(5.0, value.magnification))
}
.onEnded { _ in
// Ensure scale stays within bounds on gesture end
viewModel.scale = max(0.5, min(5.0, viewModel.scale))
}
)
.animation(.easeInOut, value: viewModel.scale)📸 VisionKit with OCR: Smarter Text Recognition
The updated VisionKit offers improved OCR for extracting text from images, supporting more languages and complex layouts like handwritten notes or wrinkled receipts.
You can find a code example in the documentation
💡 TipKit: Teach Users While They Explore
TipKit allows apps to show helpful, contextual tips — like banners or tooltips — to guide users through new features. Tips sync via iCloud, so you only see them once across all devices.
For sample code, see the documentation
✨ Metal Shaders in SwiftUI: Visual Flair, No Lag
SwiftUI now supports Metal-based shaders, allowing developers to add GPU-accelerated visual effects like animated distortions, waves, and glows, without sacrificing performance.
Whether you’re building interactive buttons, dynamic transitions, or live backgrounds, shaders let your UI pop while staying smooth.
🛠 How to Implement
struct ContentView: View {
let startDate = Date()
var body: some View {
TimelineView(.animation) { context in
Image(systemName: "figure.run.circle.fill")
.font(.system(size: 300))
.distortionEffect(ShaderLibrary.simpleWave(.float(startDate.timeIntervalSinceNow)), maxSampleOffset: .zero)
}
}
}
// METAL
[[ stitchable ]] float2 wave(float2 position, float time) {
return position + float2 (sin(time + position.y / 20), sin(time + position.x / 20)) * 5;
}iOS 18: AI-Powered Tools and Next-Level Accessibility
Launched on September 16, 2024, iOS 18 took a big leap forward with AI features and inclusive design, making iPhones smarter and more adaptive.
🎨 Mesh Gradients: Stunning, Multi-Color Backgrounds
MeshGradients in iOS 18 bring soft, fluid visuals to your app with multiple color points — ideal for music players, meditation apps, or any interface that leans on expressive design.
These gradients feel organic and dynamic, especially when animated. Think: cloud-like movement, aurora-style shifts, or subtle glowing backgrounds.
🛠 How to Implement
// View
MeshGradient(
width: 3,
height: 3,
points: [
[0, 0], [0.5, 0], [1, 0],
[0, 0.5], [0.5, 0.5], [1, 0.5],
[0, 1], [0.5, 1], [1, 1]
],
colors: viewModel.gradientColors
) // iOS 18
.ignoresSafeArea()
.animation(.easeInOut(duration: 0.3), value: viewModel.gradientColors)
// Logic
// iOS 18: Start gradient animation
private func startAnimation() {
animationTimer = Timer.scheduledTimer(withTimeInterval: 0.1, repeats: true) { [weak self] _ in
guard let self = self else { return }
DispatchQueue.main.async {
self.animateGradientColors()
}
}
} // iOS 18
// iOS 18: Stop gradient animation
private func stopAnimation() {
animationTimer?.invalidate()
animationTimer = nil
} // iOS 18
// iOS 18: Animate gradient colors
private func animateGradientColors() {
gradientColors = gradientColors.map { color in
var hue: CGFloat = 0
var saturation: CGFloat = 0
var brightness: CGFloat = 0
var alpha: CGFloat = 0
UIColor(color).getHue(&hue, saturation: &saturation, brightness: &brightness, alpha: &alpha)
hue = (hue + 0.05).truncatingRemainder(dividingBy: 1.0) // Shift hue for smooth color change
return Color(hue: hue, saturation: saturation, brightness: brightness, opacity: alpha)
}
} // iOS 18📂 Floating Tab Bar: Smarter iPad Navigation
With iPadOS 18, Apple introduced the Floating Tab Bar, a responsive navigation bar that adapts to your iPad’s orientation. In portrait mode, it shows as a compact bar at the top of the screen, and in landscape, it expands into a sidebar. You can even customize it by dragging your favorite tabs for quicker access — a neat boost for power users who want to stay efficient.
🛠 How to Implement
import UIKit
class TabBarController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
// iOS 18: Configure floating tab bar
let tab1 = UITab(title: "Home", image: UIImage(systemName: "house"), viewController: UIViewController())
let tab2 = UITab(title: "Photos", image: UIImage(systemName: "photo"), viewController: UIViewController())
let tabGroup = UITabGroup(title: "More", image: UIImage(systemName: "ellipsis"), tabs: [
UITab(title: "Settings", image: UIImage(systemName: "gear"), viewController: UIViewController())
])
// iOS 18: Enable sidebar in landscape
tabs = [tab1, tab2, tabGroup]
tabBarAppearance = .floating // iOS 18
setSidebarEnabled(true, for: .landscape) // iOS 18
}
}Why These Features Matter
iOS 16 through 18 introduced a wide range of updates that make using an iPhone more secure, helpful, and accessible. From password-free logins with Passkeys to thoughtful tools like Enhanced Dictation and Duplicate Photo Detection, these changes are designed to fit into real everyday use.
Developers also get more to work with — frameworks like Swift Charts, TipKit, and the updated VisionKit make it easier to build useful, engaging apps.
Whether you’re checking in on a flight, sharing a recipe, or just trying to keep your photo library organized, these updates offer small but meaningful improvements that add up over time.
Want to add these cool new iOS features to your app? Reach out to get started!
Originally published at https://www.forasoft.com
