Swift

Apple's new place of OC for a high-level programming language!

A quick look at the string

Most of the time,We need to look at many strings,To determine the specific content filtering out。For example, through the input method which pocketed,We need to use auxiliary code word to filter out candidates need。

In General,Find and Compare certainly figures to fastest,However, in the lexicon we can not put all the words are converted to digital (although theoretically feasible ......) search on the string,We realize there are many ways to,Here, I say my own ideas[……]

Click link to continue reading...

Based on Dynamic Programming sentence input method

In General,We will not call it on the issue of dynamic programming algorithm is "Dynamic Programming”,But called "Hidden Markov Models”,but,If we simply use the dynamic programming algorithm to solve a common directed acyclic graph,Then it can only be said to be dynamic planning ......

This time we want for the,It is based on the sentence input method thesaurus。The hidden Markov model is not based on the state transition Solution。

Thesaurus

Since no mold[……]

Click link to continue reading...

ios VoiceOver support for visually impaired users

In fact, few users know,ios system is actually a complete set of easy access mechanism,Many blind or visually impaired users prefer to useiphone

So,As a developer,I think both in terms of product sales or as a side responsibility,We should do well to easily access support。

Fortunately, however,,Thanks to Apple's strict development standards,It is generally as long as your app can be added to already approved,So basic[……]

Click link to continue reading...

iOS platform SQLite Performance Optimization

Start

In the ios platform,Permanent storage of data so few,比如说 coredata,For example realm,There are several options of nosql,But unfortunately,Several programs to support functions are still too few nosql,So let their selection is very sad - after all,,If it is a simple application of the words,It is not as good as other programs to facilitate quick - although the trend is nosql[……]

Click link to continue reading...

Memory Problems swift hurricane

Swift language development in the use of time,Many of my friends will be baffling problem encountered memory full,Obviously there ARC ,Obviously the release of memory,But still let the program memory footprint with circulation soared。

There is not really a memory leak occurs,This is actually ARC A mechanism:In each of the main Runloop At the end of the clean-up。That is,It is necessary to have a cache[……]

Click link to continue reading...

SourceKitService take up a lot of memory and CPU solutions

Swift performed using Xcode development software language when,Many people in the latter part of the project will encounter such a problem,If that diagram as:SourceKitService Take up a lot of CPU and memory,Or even directly cause the system stuck。

Then,This in the end is how it all about? StuckOverflow of the vote on the answer is to say:[……]

Click link to continue reading...

Swift uses InputMethodKit to write an input method

How to write an input method on iOS? This question has been answered a lot of people over。You can easily find a detailed tutorial by Google。but,On macOS write an input method is not so simple。

Ok,Strictly speaking,I mean use Swift to write a input method is difficult on macOS。The main reason is that no one has ever done this thing 。

Now able to[……]

Click link to continue reading...

Swift 3 GCD

Xcode 8 Official version has been released,I want the first time my project to the Swift 3 --After all, this is a trend。

During the migration process, I encountered a lot of problems--such as Xcode provides automated migration tool is not working,I've been waiting for more than two hours,after that I give up,I chose to manually migrate--after all,,Xcode's auto-correction is also very good。

however--[……]

Click link to continue reading...

Swift UIButton cornerRadius + shadow

Most of the time,We all want the button design style more in line with iOS,This will make the application interface does not look so jump,Even if the design does not look good,Nor was incompatible with the system。

"I'm not a designer,I don't know how to design beautiful style-but as close as possible to the system is not a wrong choice。 ” —— by Router

So it is for UIButton,Rounded corners + shadow should be the norm。[……]

Click link to continue reading...