Swift - Basic usage of the default UICollectionViewController for the system

When you create without xib, you need to rewrite override init(collectionViewLayout layout: UICollectionViewLayout){} The UICollectionViewLayout value needs to be passed when invoking, otherwise an error will be reported. let layout = UICollectionViewFlowLayout.init() let vc1 = DataCollectionViewController.init(collectio ...

Posted by darkwolf on Sat, 02 Feb 2019 11:00:16 -0800

Android JNI Development Series (X) JNI Accessing Java Instance Variables and Static Variables

JNI accesses Java instance variables and static variables Instance variables and static variables in Java, how to access and modify them in local code. Static variables, also known as class variables (attributes), share the same data in all instance objects and can be accessed directly by class name and variable name. Instance variables are als ...

Posted by adrafa on Sat, 02 Feb 2019 01:18:15 -0800

iOS Architecture Design

Tell me about MVC, MVVM, MVP, and how do you write it in the project? What design patterns have you used? Usually start a project. How do you think about your architecture?   1: What is the architecture? 2: MVC - Apple Edition 3: MVC - Variant 4: MVP 5: MVVM 6: Three-tier Architecture 7: Four-tier Architecture 8: Des ...

Posted by Teach on Sat, 02 Feb 2019 00:09:16 -0800

Kotlin Commission

Delegation in Kotlin In delegation mode, two objects participate in processing the same request, and the object receiving the request delegates the request to another object for processing. Class delegate class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCr ...

Posted by .Darkman on Fri, 01 Feb 2019 22:51:15 -0800

Configure Privacy Protocol - iOS

According to the new rules of Apple Privacy Protocol, all applications are required to include privacy protection protocols, so the following privacy protocol modules are added to App. When App is installed for the first time, the Privacy Protocol module is called by default to display the relevant information once. When the u ...

Posted by norpel on Fri, 01 Feb 2019 22:36:16 -0800

Several Ways to Realize View Sliding

Method of realizing view sliding: I. layout Method When the View is drawn, the system calls layout (int, int, int r, int b) method to determine the specific location of the View. Since this is the case, we can also control the position of the View by calling layout(int l, int t, int r, int b) `method to modify the four attrib ...

Posted by poppy28 on Fri, 01 Feb 2019 19:48:15 -0800

FFmpeg Mac Compiler Downloaded in Installation

Articles Catalogue Compile ffmpeg Recording issues Android cross-compilation Download ndk mac.sh script Compile ffmpeg Here we use the mac system, which will be supplemented later by other systems. download git clone https://git.ffmpeg.org/ffmpeg.git Help cd ffmpeg ./configure --help | more cd ffmpeg Installation ...

Posted by poe on Fri, 01 Feb 2019 19:15:15 -0800

[Swift 4] (5) Function basically uses | variable parameter | inout reference transfer | function type return value | function nesting

Fundamental use of functions Keyword: func func hello(name:String) ->String { let result = "Hello,"+name return result } hello(name: "imagine") Lectotype: func hello(name:String?,greet:String) ->String { let result = greet+","+(name)! return result } var nickname:String? //nil nickname = "imagine" h ...

Posted by Trojan on Fri, 01 Feb 2019 12:12:15 -0800

AVFounction Learning Notes--Media Capture

AVFounction Learning Notes - Media Capture Basic knowledge First, we introduce AVFounction capture related classes. As shown in the following figure 1. AVCaptureSession captures session core classes 2. AVCaptureDevice capture device, the most commonly used are audio and video 3. Preview Layer of AV CaptureVideo Preview Layer ...

Posted by RedMaster on Fri, 01 Feb 2019 11:27:16 -0800

[OC] Create a new class in parentheses

[OC] Create a new class in parentheses Special description The following code is only for illustration purposes, naming is not a special specification, children do not imitate oh. Preface In iOS development, we often use such a piece of code: UIView *myView = [UIView new]; myView.backgroundColor = [UIColor blackColor]; myV ...

Posted by foochuck on Fri, 01 Feb 2019 11:18:15 -0800