Skip to content

bqlin/Apple-Sample-Code

Repository files navigation

Apple Sample Code - 苹果示例代码

UI

用户界面相关示例。

NavBar

  • NavBarCustomizingUINavigationBarsappearance
  • Version 8.0, 2017-12-07

定制导航栏示例。

CustomTransitions

  • CustomViewControllerPresentationsandTransitions
  • Version 1.0, 2016-01-28

定制页面过渡。

CollectionViewTransition

  • Version 1.1, 2013-10-29

两个不同layout但内容相同的collection view动画过渡。

Photo Transitioning

  • PhotoTransitioningUsingUIViewPropertyAnimatortocreateafullyinterativeandinterruptiblecustomviewcontrollertransition-fixed
  • Version 1.0, 2016-10-27

使用UIViewPropertyAnimator创建可交互、可中断的视图控制器过渡效果。

CustomAnimatableProperty

  • Version 1.0, 2014-04-02

图层动画。

ViewTransitions

  • Version 1.12, 2013-07-31

视图过渡切换动画。

Adaptive

自适应式UI示例。

AdaptiveElements

  • AdaptiveElementsImplementingYourOwnAdaptiveDesignwithUIKit-fixed
  • Version 1.0, 2016-09-13

使用UIKit实现自适应设计。

AdaptivePhotos

  • AdaptivePhotosUsingUIKitTraitsandSizeClasses-fixed
  • Version 4.1, 2016-09-13

使用UIKit Traits和Size Classes。

AstroLayout

  • AstroLayoutBuildingAdaptiveUIwithAutoLayout
  • Version 1.0, 2015-09-16

使用Auto Layout构建自适应UI。

ScrollView

StreetScroller

  • Version 1.2, 2013-07-31

使用UIScrollView子类实现无限滚动。

PageControl

  • PageControlUsingaPaginatedUIScrollView
  • Version 7.0, 2017-09-21

This application demonstrates how to use a "paginated" UIScrollView to display pages of images in a horizontal fashion as a mechanism for navigating between different pages of content. It is optimized to minimize the memory usage by loading only three image pages at a time the user user scrolls: the current page, the page before and after it. This application was designed as universal to run on both iPhone and iPad devices.

Image

图像处理相关示例。

SamplePhotosApp

  • ExampleappusingPhotosframework
  • Version 3.0, 2015-10-21

Photos framework示例。

LargeImageDownsizing

  • Version 1.1, 2014-03-27

使用降采样方式加载并显示大图。

PhotoScroller

  • Version 1.3, 2012-11-06

使用局部加载的方式加载并显示大图。

QuartzDemo

  • Quartz2DforiOS-fixed
  • Version 5.0, 2017-09-19

Quartz2D API使用示例。

UIImageEffects

  • Version 1.1, 2014-07-31

使用vImage、Quartz、UIKit方式绘制图像高斯模糊和染色效果。

Foundation

通用功能示例。

SimpleBackgroundTransfer

  • Version 1.1, 2013-10-01

后台下载示例。

VideoAudio

音视频相关示例。

HLSCatalog

  • UsingAVFoundationtoplayandpersistHTTPLiveStreams
  • Version 1.2, 2016-09-21
  • 2018-06-26

HLS 下载示例。

AVCompositionDebugViewer

  • iOS:Version 1.1, 2014-03-11
  • macOS: Version 1.1, 2013-06-07

AVCompostion、AVVideoComposition、AVAudioMix查看、调试视图。

AVCustomEdit

  • 2014-09-18
    • Minor fix. Import OpenGL headers.
  • Version 3.0, 2017-08-17
    • Added Swift target which renders the frames using Metal off screen rendering.

AVMutableComposition、AVVideoComposition、AVVideoCompositionInstruction使用示例。

AVSimpleEditoriOS

  • Version 1.1, 2013-08-22

基本的视频编辑示例。

AVTimedAnnotationWriter

  • AVTimedAnnotationWriterUsingCustomAnnotationMetadataforMovieWritingandPlayback
  • Version 1.0, 2014-09-17

AVTimedAnnotationWriter: Using Custom Annotation Metadata for Movie Writing and Playback.

use the AVAssetWriterInputMetadataAdaptor API to write circle annotation metadata during video playback.

AVCaptureLocation

  • UsingAVFoundationAPIstorecordamoviewithlocationmetadata
  • Version 1.0, 2014-09-17

旨在使用 AVAssetWriterInputMetadataAdaptor 写入位置元数据。

AVPlayerLooping

  • AVFoundationLoopingPlayerUsingAVQueuePlayerandAVPlayerLoopertodemonstrateloopplayback
  • Version 2.0, 2016-09-13

循环播放示例。

AVCam

  • AVCam-iOSUsingAVFoundationtoCaptureImagesandMovies

AVCam: Building a Camera App | Apple Developer Documentation

使用AVFoundation采集图片和影片示例。

AVCamManual

  • AVCamManualExtendingAVCamtoUseManualCaptureAPI
  • Version 3.1, 2016-09-15

更细化的手动采集示例。

AVCamFilter

  • AVCamPhotoFilterUsingAVFoundationtoCapturephotoswithimageprocessing
  • AVCamFilterApplyingFiltersToACaptureStream
    • 2019-05-15

AVCamFilter: Applying Filters to a Capture Stream | Apple Developer Documentation

拍照滤镜示例。

AVReaderWriter

  • AVReaderWriterOfflineAudioVideoProcessing
  • Version 3.1, 2016-09-13

使用AVAssetReader和AVAssetWriter离线处理音视频。

AVBasicVideoOutput

  • Real-timeVideoProcessingUsingAVPlayerItemVideoOutput-fixed
  • Version 1.2, 2015-10-01

Real-time Video Processing Using AVPlayerItemVideoOutput.

AVFoundationSimplePlayer-iOS

  • CreatingAMoviePlayerAppWithBasicPlaybackControls
  • 2020-02-12

AVPlayer简单使用。

AVFoundationQueuePlayer

  • AVFoundationQueuePlayer-iOSUsingaMixtureofLocalFileBasedAssetsandHTTPLiveStreamingAssetswithAVFoundation
  • Version 2.0, 2016-09-13

AVQueuePlayer简单使用。

AVFoundationPiPPlayer

  • AVFoundationPiPPlayerPicture-in-PicturePlaybackwithAVKit
  • Version 1.4, 2018-02-08

简单实现视频画中画模式。

AVCamBarcode

  • AVCamBarcodeUsingAVFoundationtoDetectBarcodesandFaces
  • Version 3.0, 2017-09-19

使用AVFoundation采集API监测条形码和人脸。

AVAEMixerSample

  • UsingAVAudioEngineforPlaybackMixingandRecordingAVAEMixerSample
  • Version 2.3, 2017-03-23

使用AVAudioEngine进行播放、录音和混音。

AVMetadataRecordPlay

  • AVMetadataRecordPlayTimedMetadataCaptureRecordingandPlayback
  • Version 1.2, 2017-03-09

使用AVFoundation采集API录制和播放带时间元数据的影片。

HelloMetronome

  • Version 1.1, 2017-02-24

使用AVAudioEngine和AVAudioPlayerNode实现节拍器。

AVAEGamingExample

  • AVAudioEngine3DAudioExample
  • Version 2.0, 2016-11-03

使用AVAudioEngine、AVAudioEnvironmentNode和AVAudioPlayerNode播放多方位多声道音频。

VideoSnake

  • Version 4.1, 2016-09-28

实现视频与来自加速度计和陀螺仪的运动数据进行时间同步。

MPRemoteCommandSample

  • MPRemoteCommandSampleUsingMPRemoteCommandCenterrespondtoremotecontrolevents
  • Version 1.0, 2016-10-27

使用MPRemoteCommandCenter API处理远程控制事件及其Siri命令。

BracketStripes

  • BracketStripesUsingtheBracketedCaptureAPI
  • Version 1.1, 2016-09-28

This sample illustrates the use of still image bracketing APIs available in AVFoundation.

SpokenWord

  • RecognizingSpeechInLiveAudio
  • 2019-05-16

实现语音识别为文字。

AVAutoWait

  • AVAutoWaitUsingAVFoundationtoplayHTTPassetswithminimalstalls
  • Version 1.0, 2016-09-13

在播放HLS和渐进式下载影片时使用自动等待处理带宽限制。

RosyWriter

  • Version 2.2, 2016-09-13

使用多个管线处理采集、处理、预览和保存视频。

AVFoundationExporter

  • AVFoundationExporterExportingandTranscodingMovies
  • Version 3.0, 2016-09-13

AVAssetExportSession使用示例。

AVLoupe

  • Version 1.1, 2016-08-12

多个AVPlayerLayer与一个AVPlayer关联,展示一个可交互的放大镜效果。

StitchedStreamPlayer

  • Version 2.2, 2016-07-14

使用元数据来标识流中的不同内容。

AVMovieEditor

  • AVMovieEditorEditingtheQuickTimeFileFormat
  • Version 1.0, 2015-09-16

AVMutableMovie的使用示例。

AVLocationPlayer

  • AVLocationPlayerUsingAVFoundationMetadataReadingAPIs
  • Version 1.0, 2015-04-30

使用AVAAssetReaderOutputMetadataAdaptor从影片中读取位置元数据,并绘制到MKMapView上。

avmetadataeditor

  • Version 2.0, 2014-10-16

命令行工具,处理元数据。

AVGreenScreenPlayer

  • Version 1.3, 2014-08-20

使用AVPlayerItemVideoOutput+CIFilter实现色键处理。

AVSimplePlayerOSX

  • Version 1.1, 2014-07-09

使用AVPlayer在macOS上构建简单播放器。

AVScreenShack

  • Version 2.1, 2014-04-29

实现macOS录屏。

AVARLDelegateDemo

  • Version 1.0, 2014-04-18

AVAssetResourceLoaderDelegate在HLS中身份加密的使用:

  • HLS文件重定向
  • HLS片段获取加密密钥
  • 生成HLS自定义播放列表/索引文件

avTouch

  • Version 1.4.3, 2014-02-12

用AVAudioPlayer播放音频与实现电平预览。

avtimecodereadwrite

  • Version 1.2, 2014-01-22

使用AVAssetReader和 AVAssetWriter来读写asset的时间码轨道。

AudioTapProcessor

  • Version 1.0.1, 2013-08-17

使用MTAudioProcessingTap对音频sample可视化。

AVCustomEditOSX

  • Version 1.1, 2013-07-26

AVFoundation编辑API使用。

avsubtitleswriterOSX

  • Version 1.0.1, 2013-06-11

实现读取外部字幕写入到媒体文件中。

AVLegibleMeaningsOSX

  • Version 1.0, 2013-06-07

AVPlayerItemLegibleOutput使用。

AVMediaSelectionDemo

  • Version 1.0, 2013-06-07

媒体选项使用。

GLCameraRipple

  • Version 1.2, 2013-02-21

使用OpenGL渲染采集内容。实现波纹效果。

AVRecorder

  • Version 2.1, 2012-11-29

使用AVFoundation API在macOS上进行采集录制。

AVCaptureToAudioUnit

  • iOS:Version 1.0, 2012-10-08
  • macOS:Version 1.0, 2012-10-04

在录制过程中使用AudioUnit。

Metal

MetalComputeBasic

  • PerformingCalculationsOnAGPU
  • 2020-02-29

使用Metal着色器实现一般的for循环,并在计算管线实现并行计算。

MetalKitAndRenderingSetup

  • UsingMetalToDrawAViewContentsents
  • 2019-05-18

使用MetalKit进行基本的颜色绘制。

HelloTriangle

  • UsingARenderPipelineToRenderPrimitives
  • 2020-09-05

使用Metal绘制渐变三角形。

CPU-GPU-Synchronization

  • SynchronizingCPUAndGPUWork
  • 2021-01-16

同步CPU和GPU的工作。

BasicTexturing

  • CreatingAndSamplingTextures
  • 2021-01-16

展示一个自定义纹理加载器,将图像数据加载到纹理中,并将其绘制到四边形中。

DepthTesting

  • CalculatingPrimitiveVisibilityUsingDepthTesting
  • 2021-02-04

通过深度纹理来确定场景中可见的像素。

CustomRenderPassSetup

  • CustomizingRenderPassSetup
  • 2021-01-16

离屏渲染。

BasicArgumentBuffers

  • ManagingGroupsOfResourcesWithArgumentBuffers
  • 2021-02-06

参数缓冲区使用。

ArgumentBufferArraysWithHeaps

  • UsingArgumentBuffersWithResourceHeaps
  • 2021-01-30

使用资源堆管理参数缓冲区数组。

GPUArgumentBufferEncoding

  • EncodingArgumentBuffersOnTheGPU
  • 2021-02-03

在GPU上编码参数缓冲区。

DynamicTerrainWithArgumentBuffers

  • RenderingTerrainDynamicallyWithArgumentBuffers
  • 2021-02-19

使用参数缓冲区动态渲染地形。

BasicIndirectCommandBuffers

  • EncodingIndirectCommandBuffersOnTheCPU
  • 2021-02-04

在CPU上编码间接命令缓冲区。

IndirectCommandBuffersWithGPUEncoding

  • EncodingIndirectCommandBuffersOnTheGPU
  • 2021-02-04

在GPU上编码间接命令缓冲区。

CustomMetalView

  • CreatingACustomMetalView
  • 2020-09-05

自定义Metal视图。

DeviceSelectionAndFallback

  • SelectingDeviceObjectsForGraphicsRendering
  • 2021-02-27

为图形渲染选择设备。

DeviceFallbackForCompute

  • SelectingDeviceObjectsForComputeProcessing
  • 2021-02-27

为计算处理选择设备对象。

OpenGLMetalInteroperability

  • MixingMetalAndOpenGLRenderingInAView
  • 2019-05-18

在视图中混合Metal和OpenGL渲染。

TextureCompute

  • ProcessingATextureInAComputeFunction
  • 2021-03-13

在计算函数中处理纹理。