mobile-app-interface

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Expo iOS Designer Core Design Prompt “Design a modern, clean iOS app using Expo and React Native that follows Apple’s Human Interface Guidelines: prioritize clear hierarchy and harmony; respect safe areas; use responsive Flexbox layouts and Dynamic Type with SF Pro; support dark mode with semantic system-friendly colors; keep minimum 44pt touch targets; use native navigation patterns (tabs, stacks, modals) and standard gestures; apply Liquid Glass materials sparingly for overlays like bars, sheets, and popovers with AA contrast; add purposeful motion and gentle haptics; honor Reduce Motion and Reduce Transparency; deliver icons/splash and store assets per Apple guidance.”.​
Design Rules
  1. Safe Areas Rule Wrap screens with SafeAreaProvider/SafeAreaView to avoid notches and the home indicator; never hard‑code insets.​
tsx import { SafeAreaView } from "react-native-safe-area-context";
export function Screen({ children }) { return <SafeAreaView style={{ flex: 1 }}>{children}</SafeAreaView>; } 2) Typography Rule Use SF Pro Text/Display (or system) with a documented type ramp; support Dynamic Type so text scales with user settings.​
tsx <Text style={{ fontSize: 17, fontWeight: "600" }} accessibilityRole="header"> Title </Text> <Text style={{ fontSize: 15, color: "#6b7280" }}>Secondary text</Text> 3) Touch Target Rule Ensure interactive controls are at least 44×44pt, with adequate spacing between targets for accurate taps.​
tsx <TouchableOpacity style={{ minHeight: 44, minWidth: 44, justifyContent: "center", alignItems: "center" }} accessibilityRole="button"
<Text>Action</Text> </TouchableOpacity> 4) Color & Theming Rule Use semantic roles and support light/dark with AA contrast for text and essential UI; prefer system-friendly palettes that adapt across appearances.​
tsx const scheme = useColorScheme(); const bg = scheme === "dark" ? "#0B0B0B" : "#FFFFFF"; const fg = scheme === "dark" ? "#E5E7EB" : "#111827"; 5) Navigation Rule Use tab bars for top-level sections, stack for drill-ins, and modals for short tasks; align back navigation with iOS gestures and conventions.​
IMPORTANT: For Tab Bars with Liquid Glass ALWAYS use
NativeTabs
from Expo Router instead of custom tab bars. NativeTabs provides native iOS
UITabBarController
with built-in Liquid Glass effect - no manual implementation needed!
tsx // ✅ CORRECT: Native tab bar with built-in Liquid Glass import { NativeTabs, Icon, Label } from "expo-router/unstable-native-tabs";
export default function TabLayout() { return ( <NativeTabs> <NativeTabs.Trigger name="index"> <Icon sf={{ default: 'house', selected: 'house.fill' }} /> <Label>Home</Label> </NativeTabs.Trigger> <NativeTabs.Trigger name="settings"> <Icon sf={{ default: 'gearshape', selected: 'gearshape.fill' }} /> <Label>Settings</Label> </NativeTabs.Trigger> </NativeTabs> ); }
// ❌ WRONG: Custom tab bars - requires manual Liquid Glass implementation import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; const Tab = createBottomTabNavigator();
NativeTabs Features:
  • Built-in Liquid Glass blur (automatic on iOS 26+)
  • SF Symbols for icons (
    sf
    prop with default/selected states)
  • Native iOS animations and haptics
  • Automatic light/dark mode adaptation
  • System-native behavior (matches Safari, Apple Music, etc.)
  • No custom styling required
SF Symbols Icon Examples:
  • Home:
    house
    /
    house.fill
  • Settings:
    gearshape
    /
    gearshape.fill
  • Messages:
    message
    /
    message.fill
  • Profile:
    person
    /
    person.fill
  • Search:
    magnifyingglass
  • Calendar:
    calendar
    /
    calendar.fill
  • Star:
    star
    /
    star.fill
Find more at: https://developer.apple.com/sf-symbols/ 6) Motion & Haptics Rule Keep transitions 200–400ms with native-feeling ease or spring; pair key state changes and confirmations with gentle haptics.​
tsx import * as Haptics from "expo-haptics"; const onPress = async () => { await Haptics.selectionAsync(); /* action */ }; 7) Accessibility Rule Provide accessibilityLabel, Role, Hint, and state; verify logical focus order and complete VoiceOver announcements across flows.​
tsx <Switch value={isOn} onValueChange={setOn} accessibilityRole="switch" accessibilityLabel="Notifications" accessibilityState={{ checked: isOn }} /> 8) List & Performance Rule Use FlatList/SectionList with keyExtractor, optional getItemLayout, and memoized rows; avoid re-render churn for smooth 60fps scrolling.​
tsx <FlatList data={items} keyExtractor={(it) => it.id} renderItem={memo(({ item }) => <Row item={item} />)} /> 9) Assets & App Store Rule Create icons and splash per Expo docs; verify in an EAS build, not Expo Go; keep store metadata and permissions aligned to behavior.​
json // app.json (excerpt) { "expo": { "icon": "./assets/icon.png", "splash": { "image": "./assets/splash.png", "resizeMode": "contain", "backgroundColor": "#000000" } } } 10) Layout & Spacing Rule Compose with Flexbox and a consistent spacing scale; adapt padding to dynamic type and safe areas for balanced, accessible layouts.​
tsx <View style={{ padding: 16, gap: 12, flex: 1 }}> {/* content */} </View> 11) Liquid Glass Materials Rule Use Liquid Glass on overlay surfaces (navigation/tab bars, large headers, sheets, popovers, floating cards) to add depth without distracting from content; verify AA contrast over dynamic backdrops in light and dark modes.​
Respect Reduce Transparency and provide solid/tinted fallbacks; avoid placing dense text over highly saturated or high-frequency backdrops.​
Keep materials subtle: modest opacity/blur, applied sparingly to chrome rather than full-screen backgrounds for readability and performance.​
  1. Expo Glass Modules Rule Official module: expo-glass-effect. Provides GlassView, GlassContainer, and isLiquidGlassAvailable() to detect capability and compose grouped glass surfaces.​
Community SwiftUI module: expo-liquid-glass-view. Fine control over corner radius, styles, and tints; iOS-only; ensure platform fallbacks.​
Install and basic usage:
bash npx expo install expo-glass-effect tsx import { GlassView } from "expo-glass-effect";
<GlassView glassEffectStyle="regular" tintColor="systemMaterialLight" /> SwiftUI-powered option:
bash npx expo install expo-liquid-glass-view tsx import { ExpoLiquidGlassView } from "expo-liquid-glass-view"; These render native iOS Liquid Glass via UIVisualEffectView/SwiftUI, and gracefully fall back to a regular View on unsupported platforms.​
  1. Availability & Fallbacks Rule Check availability on iOS 26+ with isLiquidGlassAvailable(); also honor AccessibilityInfo.isReduceTransparencyEnabled() for fallbacks to solid/tinted surfaces.​
tsx import { isLiquidGlassAvailable, GlassView } from "expo-glass-effect"; import { AccessibilityInfo, Platform } from "react-native";
const useGlass = async () => { const supported = Platform.OS === "ios" && (await isLiquidGlassAvailable()); const reduceTransparency = await AccessibilityInfo.isReduceTransparencyEnabled(); return { supported, reduceTransparency }; }; 14) Materials Performance Rule Avoid full-screen realtime blur on animated scenes; scope glass to small overlays, cache where possible, and profile on device; fall back to static blur or solids when FPS dips.​
  1. Icon Variants Rule Provide dark and tinted icon variants following updated Apple resources for consistent appearance with system tints and wallpapers.​
Workflow
  1. Interview User Scope: screen, flow, or component; target file/repo path; materials use-cases (bars, sheets, overlays); accessibility/performance targets.​
  2. Design & Implement Match HIG patterns and the existing design system; compose UI first; define component variants/states.​
Apply all rules (safe area, type, touch, color, nav, motion, a11y, performance, materials, icons). Test Dynamic Type, dark mode, VoiceOver, Reduce Transparency/Motion, and iOS 26 availability.​
Validate on device for performance, notch layouts, and readability over moving content and wallpapers.​
  1. Component Structure Pattern tsx import { View, Text } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context";
export function ScreenTemplate({ title, children }) { return ( <SafeAreaView style={{ flex: 1 }}> <View style={{ padding: 20, gap: 16 }}> <Text style={{ fontSize: 28, fontWeight: "700" }} accessibilityRole="header"> {title} </Text> <View style={{ gap: 12 }}>{children}</View> </View> </SafeAreaView> ); } Quality Checklist Safe areas respected across edges and orientations.​
SF Pro/system fonts with Dynamic Type verified at larger sizes.​
44×44pt touch targets and adequate spacing confirmed on device.​
Light/dark with semantic colors and WCAG AA contrast for text and core UI.​
Native navigation patterns and back gestures consistent with iOS.​
Purposeful motion with gentle haptics; honors Reduce Motion.​
Accessibility labels/roles/hints/states and logical focus order; VoiceOver validated.​
Lists are smooth and jank-free; renders and images optimized.​
Icons/splash configured via Expo and tested in an EAS build.​
Store metadata and permissions aligned with behavior.​
Liquid Glass used for overlays only; AA contrast verified over dynamic backdrops.​
Availability checks with isLiquidGlassAvailable(); fallbacks for Reduce Transparency.​
Materials performance profiled; fallbacks applied if FPS drops.​
Icon dark/tinted variants per updated resources.​
References Apple HIG: layout, navigation, materials, typography.​
Expo GlassEffect API and install guides; SwiftUI module references.​
Expo docs: safe areas, splash/icon configuration, project setup and device testing.​
Accessibility: React Native docs and testing guidance for roles, labels, focus order, touch targets.​
Expo iOS Designer 核心设计提示 “设计一款基于Expo和React Native的现代简洁iOS应用,遵循Apple’s Human Interface Guidelines:优先保证清晰的层级结构与视觉和谐;遵循安全区域规范;采用响应式Flexbox布局及搭配SF Pro字体的Dynamic Type;支持深色模式,使用符合语义的系统友好型色彩;确保触控目标最小尺寸为44pt;采用原生导航模式(标签栏、栈、模态框)及标准手势;在栏、面板、弹出框等覆盖层上适度使用Liquid Glass材质,保证AA级对比度;添加有意义的动效及轻柔的触觉反馈;遵循Reduce Motion和Reduce Transparency设置;按照苹果指南交付图标、启动页及应用商店所需资源。”
设计规则
  1. 安全区域规则 使用SafeAreaProvider/SafeAreaView包裹页面,避开刘海屏和Home指示条;绝对不要硬编码内边距值。
tsx import { SafeAreaView } from "react-native-safe-area-context";
export function Screen({ children }) { return <SafeAreaView style={{ flex: 1 }}>{children}</SafeAreaView>; } 2) 排版规则 使用SF Pro Text/Display(或系统字体)并采用文档化的字号层级;支持Dynamic Type,让文本可随用户设置缩放。
tsx <Text style={{ fontSize: 17, fontWeight: "600" }} accessibilityRole="header"> Title </Text> <Text style={{ fontSize: 15, color: "#6b7280" }}>Secondary text</Text> 3) 触控目标规则 确保交互式控件的尺寸至少为44×44pt,且各目标间留有足够间距以保证精准点击。
tsx <TouchableOpacity style={{ minHeight: 44, minWidth: 44, justifyContent: "center", alignItems: "center" }} accessibilityRole="button"
<Text>Action</Text> </TouchableOpacity> 4) 色彩与主题规则 使用语义化角色定义色彩,支持明暗模式,文本及核心UI需满足AA级对比度;优先选用可适配不同外观的系统友好型调色板。
tsx const scheme = useColorScheme(); const bg = scheme === "dark" ? "#0B0B0B" : "#FFFFFF"; const fg = scheme === "dark" ? "#E5E7EB" : "#111827"; 5) 导航规则 顶层页面使用标签栏,深度跳转使用栈导航,短任务使用模态框;返回导航需与iOS手势及规范保持一致。
重要提示:带Liquid Glass效果的标签栏 请务必使用Expo Router中的
NativeTabs
而非自定义标签栏。NativeTabs提供原生iOS
UITabBarController
,内置Liquid Glass效果——无需手动实现!
tsx // ✅ 正确用法:内置Liquid Glass效果的原生标签栏 import { NativeTabs, Icon, Label } from "expo-router/unstable-native-tabs";
export default function TabLayout() { return ( <NativeTabs> <NativeTabs.Trigger name="index"> <Icon sf={{ default: 'house', selected: 'house.fill' }} /> <Label>Home</Label> </NativeTabs.Trigger> <NativeTabs.Trigger name="settings"> <Icon sf={{ default: 'gearshape', selected: 'gearshape.fill' }} /> <Label>Settings</Label> </NativeTabs.Trigger> </NativeTabs> ); }
// ❌ 错误用法:自定义标签栏——需手动实现Liquid Glass效果 import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; const Tab = createBottomTabNavigator();
NativeTabs特性:
  • 内置Liquid Glass模糊效果(iOS 26+自动生效)
  • 支持SF Symbols图标(通过
    sf
    属性设置默认/选中状态)
  • 原生iOS动效与触觉反馈
  • 自动适配明暗模式
  • 系统原生行为(与Safari、Apple Music等一致)
  • 无需自定义样式
SF Symbols图标示例:
  • 首页:
    house
    /
    house.fill
  • 设置:
    gearshape
    /
    gearshape.fill
  • 消息:
    message
    /
    message.fill
  • 个人资料:
    person
    /
    person.fill
  • 搜索:
    magnifyingglass
  • 日历:
    calendar
    /
    calendar.fill
  • 收藏:
    star
    /
    star.fill
更多图标请访问:https://developer.apple.com/sf-symbols/ 6) 动效与触觉反馈规则 转场动效时长控制在200–400ms,使用贴近原生的缓动或弹簧曲线;关键状态变更及确认操作搭配轻柔的触觉反馈。
tsx import * as Haptics from "expo-haptics"; const onPress = async () => { await Haptics.selectionAsync(); /* 执行操作 */ }; 7) 无障碍规则 提供accessibilityLabel、角色、提示及状态信息;验证合理的焦点顺序,确保全流程VoiceOver播报完整。
tsx <Switch value={isOn} onValueChange={setOn} accessibilityRole="switch" accessibilityLabel="Notifications" accessibilityState={{ checked: isOn }} /> 8) 列表与性能规则 使用FlatList/SectionList,搭配keyExtractor、可选的getItemLayout及记忆化行组件;避免不必要的重渲染,保证60fps流畅滚动。
tsx <FlatList data={items} keyExtractor={(it) => it.id} renderItem={memo(({ item }) => <Row item={item} />)} /> 9) 资源与应用商店规则 按照Expo文档创建图标及启动页;需在EAS构建中验证,而非Expo Go;确保应用商店元数据与权限设置和应用行为一致。
json // app.json(节选) { "expo": { "icon": "./assets/icon.png", "splash": { "image": "./assets/splash.png", "resizeMode": "contain", "backgroundColor": "#000000" } } } 10) 布局与间距规则 使用Flexbox及统一的间距比例构建布局;根据动态字体及安全区域调整内边距,打造平衡、易用的布局。
tsx <View style={{ padding: 16, gap: 12, flex: 1 }}> {/* 内容 */} </View> 11) Liquid Glass材质规则 仅在覆盖层(导航栏/标签栏、大标题、面板、弹出框、浮动卡片)上使用Liquid Glass材质,以增加层次感但不干扰内容;需在明暗模式下验证动态背景上的内容是否满足AA级对比度。
遵循Reduce Transparency设置,提供纯色/ tinted fallback方案;避免在高饱和度或高频背景上放置密集文本。
材质使用需克制:采用适度的透明度/模糊效果,仅用于界面框架而非全屏背景,以保证可读性与性能。
  1. Expo Glass模块规则 官方模块:expo-glass-effect。提供GlassView、GlassContainer及isLiquidGlassAvailable()方法,用于检测功能支持性并组合多个玻璃效果表面。
社区SwiftUI模块:expo-liquid-glass-view。可精细控制圆角、样式及色调;仅支持iOS;需保证平台兼容方案。
安装及基础用法:
bash npx expo install expo-glass-effect tsx import { GlassView } from "expo-glass-effect";
<GlassView glassEffectStyle="regular" tintColor="systemMaterialLight" /> 基于SwiftUI的可选方案:
bash npx expo install expo-liquid-glass-view tsx import { ExpoLiquidGlassView } from "expo-liquid-glass-view"; 这些组件通过UIVisualEffectView/SwiftUI渲染原生iOS Liquid Glass效果,并在不支持的平台上自动降级为常规View。
  1. 兼容性与降级方案规则 使用isLiquidGlassAvailable()检测iOS 26+的兼容性;同时需遵循AccessibilityInfo.isReduceTransparencyEnabled()设置,为Reduce Transparency提供纯色/ tinted降级方案。
tsx import { isLiquidGlassAvailable, GlassView } from "expo-glass-effect"; import { AccessibilityInfo, Platform } from "react-native";
const useGlass = async () => { const supported = Platform.OS === "ios" && (await isLiquidGlassAvailable()); const reduceTransparency = await AccessibilityInfo.isReduceTransparencyEnabled(); return { supported, reduceTransparency }; }; 14) 材质性能规则 避免在动画场景中使用全屏实时模糊效果;将玻璃效果限制在小型覆盖层上,尽可能缓存内容,并在设备上进行性能分析;若帧率下降,降级为静态模糊或纯色背景。
  1. 图标变体规则 根据苹果最新资源提供深色及tinted图标变体,确保与系统色调及壁纸保持一致的外观。
工作流程
  1. 用户沟通 明确范围:页面、流程或组件;目标文件/仓库路径;材质使用场景(栏、面板、覆盖层);无障碍/性能指标。
  2. 设计与实现 匹配HIG模式及现有设计系统;优先构建UI;定义组件变体/状态。
应用所有规则(安全区域、排版、触控、色彩、导航、动效、无障碍、性能、材质、图标)。测试Dynamic Type、深色模式、VoiceOver、Reduce Transparency/Motion及iOS 26兼容性。
在设备上验证性能、刘海屏布局及动态内容/壁纸上的可读性。
  1. 组件结构示例 tsx import { View, Text } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context";
export function ScreenTemplate({ title, children }) { return ( <SafeAreaView style={{ flex: 1 }}> <View style={{ padding: 20, gap: 16 }}> <Text style={{ fontSize: 28, fontWeight: "700" }} accessibilityRole="header"> {title} </Text> <View style={{ gap: 12 }}>{children}</View> </View> </SafeAreaView> ); } 质量检查清单 各边缘及横竖屏方向均遵循安全区域规范。
使用SF Pro/系统字体,且Dynamic Type在大字号下验证正常。
设备上确认44×44pt触控目标及足够间距。
明暗模式使用语义化色彩,文本及核心UI满足WCAG AA级对比度。
原生导航模式及返回手势与iOS规范一致。
动效有实际意义且搭配轻柔触觉反馈;遵循Reduce Motion设置。
无障碍标签/角色/提示/状态及合理焦点顺序;VoiceOver验证通过。
列表滚动流畅无卡顿;渲染及图片已优化。
图标/启动页通过Expo配置,并在EAS构建中测试。
应用商店元数据与权限设置和应用行为一致。
Liquid Glass仅用于覆盖层;动态背景上的内容已验证AA级对比度。
使用isLiquidGlassAvailable()检测兼容性;为Reduce Transparency提供降级方案。
已对材质性能进行分析;帧率下降时已应用降级方案。
图标深色/tinted变体符合最新资源要求。
参考资料 Apple HIG:布局、导航、材质、排版。
Expo GlassEffect API及安装指南;SwiftUI模块参考资料。
Expo文档:安全区域、启动页/图标配置、项目搭建及设备测试。
无障碍:React Native文档及角色、标签、焦点顺序、触控目标的测试指南。