Categories
Swift

String.count vs NSString.length

generally speaking,Swift inner String And it is NSString Bridged,For example, I have written String NSString and what difference?,In short we are here to discuss major,String[……]

Click link to continue reading...

Categories
Python R0uter Input Tool

Changjei generation and accelerated code table from cns11643 Chinese official standard full flash

Has long been,I'm rightCJandExpressThis is useful advice ...... circulated on the Internet version of the code table many fellow sufferers,But the name called "CJ",By contrast and Wubi,Anyhow, also points a stroke 86 and 98,Then there is little new in the new century, and so on,But no Changjei,No matter what version of the CJ,Called "CJ"。

This is very embarrassing,Changjei code table is different for each person with,But not the same where,He did not know。

total[……]

Click link to continue reading...

Categories
Swift R0uter Input Tool

How pocketed input method is a process of PUSH messages

Do the soft keyboard on a mobile device,So how to handle user clicks position,It is the first problem you encounter,in this problem,I have come a long way。

I touch a logical development since input method pocketed roughly classified into three stages,Now were Laijiangjiang design ideas,I hope this can help you。

The first generation of touch engine

Obviously,For a beginner,There's nothing better use of the control system,Full-featured[……]

Click link to continue reading...

Categories
Swift

Let iOS macOS Chinese font achieve visual vertical centering

In the development off the grid when the input method macOS,I encountered a problem of a more wonderful,This problem has plagued me now - the time when some places need to display a row of vertically centered text,How to make these characters real "center"?

 

At first glance this seems to make much sense,Well ...... like vertical center,On macOS [crayon-5dccfcae266b61[……]

Click link to continue reading...

Categories
Swift

Swift in the array to re-program

When developed using Swift input pocketed,I met a very interesting question -Deduplication

All to known,Candidate input method in the calculation will always be out there may be a duplicate options (such as code table and have a word in the lexicon,They may be different coding,But the word is the same and the like),This time you need to re,But while keeping the same order of candidates。

Others solutions

If you go online to find,Then[……]

Click link to continue reading...

Categories
Mac OS Swift

Pocketed input macOS 2 How is optimized for VoiceOver

Two years ago,I wrote an article entitled "ios VoiceOver support for visually impaired users"Articles,Inside describes how iOS end of the necessary support for VoiceOver,Then I developed a macOS input terminal pocketed,But unfortunately due macOS own system bug,Third-party input method can not obtain focus VoiceOver (mainly[……]

Click link to continue reading...

Categories
Swift

swift4 urlSession get and post requests network

Ado,Directly on the code。

GET:

POST:

 [……]

Click link to continue reading...

Categories
Swift

Swift how to use a dictionary as a paradigm constraints

Today, the group participants Someone made such a problem,Why dictionary type characteristics as the paradigm of the time constraint type,It will inevitably error?

Obviously,He said very clearly,"You can not be from a non-agreement、Non-type class inheritance. "。Obviously,A dictionary is a paradigm structure ......

Then the solution is also very clear ideas,Create[……]

Click link to continue reading...

Categories
Swift

Pocketed X input method is how to deal with the problem of delayed edge of the screen

Problem

Pocketed in the development process input,I have always been plagued by a problem,That is when the user clicks on the left edge of the screen, UIButton of touchDown event almost turned into a [crayon-5[……]

Click link to continue reading...