ios learning note 02 optional type, making weather query app (network access)

lebus tutorial 02 p47 optional variable: Lectotype: Value, equal to xxx or no value nil, only variables declared as optional types can be assigned values Force to unpack! Optional binding: class FastCar:Car{ var window:Int? // Optional variable override func drive() { super.driv ...

Posted on Mon, 03 Feb 2020 05:30:13 -0800 by bal bal

php file operation (finally, encapsulate common file functions)

Document information related API $filename="./1-file.php"; //filetype($filename):Get the type of file,Returns the type of file echo 'The file type is:',filetype($filename),"\n";//file //filesize($filename): get the size of the file, return bytes echo 'The file size is:',filesize($filename),"\n";//1214 //filectime($filen ...

Posted on Sat, 11 Jan 2020 00:44:16 -0800 by FrostedFlakes

Send and receive messages through the nsnotification center in Objective-C?

I am trying to send and receive messages through the nsnotification center in Objective-C. However, I have not found any examples of how to do this. How do I send and receive messages through the nsnotification center? #1 building This helped me: // Add an observer that will respond to loginComplete [[NSNotificationCenter defaultCenter ...

Posted on Mon, 06 Jan 2020 08:47:02 -0800 by ozkan

swift custom pop up AlertView

swift custom pop up Custom AlertView If your swift project is under 4.0 pod 'AEAlertView', '1.0' Swift 4.0 and above direct pod This paper introduces the realization idea Source link Custom pop ups Look at the picture first. Project thinking Define a View to show Code block override init(frame: CGRect) { ...

Posted on Wed, 01 Jan 2020 04:16:41 -0800 by Ravenous

OC project ignore file configuration

Introduction - main problems to be solved oc projects often ignore files; For files that have been added to version control, let gitignore take effect; An explanation of citing others to ignore documents 1. Ignore file content in OC project # Xcode # # gitignore contributors: remember to update Global/Xcode.gitignore, O ...

Posted on Sun, 22 Dec 2019 07:21:29 -0800 by ClanCC

Building process of IaaS platform

Basic configuration: controller: 1.Modify host name: hostnamectl set-hostname controller 2.Turn off the firewall and set power on not to start: systemctl stop firewalld systemctl disable firewalld 3.modify hosts Document: 192.168.214.10 controller 193.168.214.20 compute ...

Posted on Thu, 21 Nov 2019 10:53:35 -0800 by titeroy

Self quantification - export exercise data using HealthKit

I started running recently. I feel the circle of "fitness record" every day. You can see the amount of activity, the length of exercise and the standing time in the circle every day. After opening the details, you can also see the running steps, running distance, data synchronized from a third party, etc. Today, our goal is to get t ...

Posted on Fri, 15 Nov 2019 11:38:35 -0800 by poe

Swift, C and c mixed

     Last article Write the mixed calls of swift, C and C + +. I think you have basic skills for these simple calls. So let's see how to use C array in swift. For this array. For pointers, we can assign values directly and read them directly. For arrays, so can we. Let's see. How to read. Test envir ...

Posted on Wed, 23 Oct 2019 20:30:41 -0700 by rahulephp

iOS knowledge combing - multi thread API mathematics

In general, there are four schemes for using multithreading on the iOS platform: Pthreads interface based on c language, which is POSIX c language is widely used in programming, but it is seldom used in iOS development. The exposed interface is relatively low-level and has perfect functions. Accordingly, it requires programmers to manage the l ...

Posted on Mon, 21 Oct 2019 19:03:12 -0700 by Zilvermeeuw

Algorithm - binary search algorithm (OC, Swift, Python)

Preface Binary search is a very common algorithm in the process of program development, and it is also the most frequently asked knowledge point in the process of exploring the algorithm knowledge point in the process of programmer interview; binary search is also often used in the actual development process; for example, we can find the larges ...

Posted on Fri, 18 Oct 2019 18:12:37 -0700 by madmax