• IOS uses AV Foundation to display videos


    The example in this paper shares the specific code of iOS using AVFoundation to display video for your reference. The details are as follows. // // Capter2ViewController.m // IosTest // // Created by garin on 13-7-19. // Copyright (c) 2013 garin. All rights reserved. // #import “Capter2ViewController.h” @interface Capter2ViewController () @end @implementation Capter2ViewController -(void) dealloc […]

  • IOS Custom Camera for Photography and Video Recording


    In this paper, we share the specific code of iOS customized camera to take photos and record videos for your reference. The details are as follows. Use the AV Foundation framework. This is Demo. First, declare the following objects: #import “CustomeCameraViewController.h” #import <AVFoundation/AVFoundation.h> #import <AssetsLibrary/AssetsLibrary.h> @interface CustomeCameraViewController ()<AVCaptureFileOutputRecordingDelegate> { // AVCaptureSession object performs data transfer […]

  • Custom Camera for iOS Development Skills


    Recently, the company’s project used cameras, because no system camera, UI to the camera cut, must be customized. Take the time to simply study the camera’s customization. The camera belongs to the system hardware, which requires us to manually call the camera hardware of the iPhone, which is divided into the following steps: 1. First […]

  • IOS 10 Custom Camera Function


    The specific code of iOS 10 custom camera function is shared for your reference by an example in this paper. The details are as follows. Code directly // // TGCameraVC.swift // TGPhotoPicker // // Created by targetcloud on 2017/7/25. // Copyright 2017 targetcloud. All rights reserved. // import UIKit import AVFoundation import Photos @available(iOS 10.0, […]

  • IOS Scanning Two-Dimensional Code to Realize Gesture Closing and Telescoping Lens


    In the process of scanning, there is always the need for magnifying lens. Apple provides video Scale AndCropFactor in AV Capture Connection: zoom in and zoom in and zoom in and zoom in and out. Combined with gesture UIPinch Gesture Recognizer, it is very simple to achieve gesture to pull the lens closer and farther. […]

  • Detailed Analysis of the Single Use of iOS Development Tutorial


    Introducer Singletons are one of the core models of Cocoa. On iOS, singletons are common, such as UI Application, NSFileManager, and so on. Although they are very convenient to use, in fact they have many problems to pay attention to. So next time you auto-complete the dispatch_once snippet, think about the consequences. What is singleton […]

  • IOS realizes animation effects such as page turning and rotation based on CATRANATION


    The animation effects of turning over, rotating, desalinating, advancing, sliding in and out, cube, sucking, ripple and so on are realized based on CATRANATION. Let’s first look at the effect map. Paste the code below: #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end #import “ViewController.h” // Get the screen width and height #define mainW [UIScreen mainScreen].bounds.size.width […]

  • Encapsulation of iOS drop-down and pull-up refresh controls


    IOS encapsulates drop-down and pull-up refresh controls. First of all, look at the effect map. Simply elaborate: customize the head and tail refresh view, inherit UIView, monitor scrollView sliding through KVO, set refresh state by offset, and modify scrollView rolling position by modifying state. Build a UIScrollView classification, add pull-up, drop-down refresh and callback methods, […]

  • IOS custom scrollView scrollbar for display and interaction


    The previous article briefly described the package of pull-up and drop-down refresh controls. On this basis, a custom scrollView scrollbar was added to display and interact. First, take a look at the effect map. Simply elaborate the implementation logic: custom scrollbar view inherits UIView, adds scrollbar sliding events, other area click events, and associates with […]

  • IOS custom horizontal scroll bar, progress bar


    IOS customizes horizontal scrollbars and progress bars, inherits UIView, and interacts with track and slider. Look at the effect map first. Simply put logic, create a new class inheriting UIView, add UITap Gesture Recognizer click and UIPanGesture Recognizer sliding gesture to track and slider respectively. Get the offset, calculate the position of the control, and […]

  • IOS Sets Corner Shadows to Avoid Off-screen Rendering


    IOS controls are rounded to avoid off-screen rendering. Off-screen rendering:GPU (Graphics Processor) creates a new rendering buffer outside the current screen buffer to work. This will bring us additional performance loss. If such operations reach a certain number, it will trigger frequent buffer merging and context switching, and will cause the phenomenon of cartoon and […]

  • IOS Implements PDF File Browsing Function


    Write a small Demo, display the local PDF format file, support page turning, page skipping, zooming. Look at the effect map first. There are many ways to display PDF format files in iOS development. The simplest should be UIWebView, which can load local or network PDF files to support up and down sliding browsing and […]