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-5c97be8c0af7b8[……]

Click link to continue reading...

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...

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...

swift4 urlSession get and post requests network

Ado,Directly on the code。




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?

[caption id="attachment_3102" align="aligncenter" width="1534"] With a particular type of dictionary constraint as given type paradigm[/caption]

Click link to continue reading...

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


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...

NSTextField text blur solution canDrawSubviewsIntoLayer

Among developing pocketed input process macOS,I have been plagued by a strange question - text blurred。


No matter how I debug,Pocketed candidate text input method can not achieve the original text as clear and sharp。After a big ask God,The resulting experience is to see live a long time - upstreamSub-pixel rendering bug。

In many platforms have similar problems,macOS[……]

Click link to continue reading...

UserNotifications user-created using sound as a tone

Use custom sounds as notification sounds

In iOS 10 after,iOS uses a new UserNotifications As the notification API,This allows developers to use images、video、Sound and other rich media content as the notification,While further,You can also use the Notification Content Ex[……]

Click link to continue reading...