Programming Development

swift4 urlSession get and post requests network

Ado,Directly on the code。

GET:

POST:

 [……]

Click link to continue reading...

How to use dictionary types as generic constraints in Swift

Today, the group participants Someone made such a problem,Why use the characteristic dictionary type as a generic type constraint,It will inevitably error?

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

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

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。

Sub-pixel

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

How pocketed input method macOS is how to handle ascii 0x01 compatibility issues -macOS input settings correct buffer

As early as last year,Off the grid user input methods have reported pocketed Chinese input method macOS can not type in normal mode MarkDown proper way cloud notes,After testing proved true,Embodied in the text when hit,buffer refresh will be strange delete a character before the cursor - on,no more, no less,To delete a。

Fiddle for a long time failed,Finally, I did not move all the contents out of print,Find[……]

Click link to continue reading...

Pocketed input method is how to share anti-piracy accounts on iOS

For iOS developers,The face of app piracy,The biggest problem is not a technical break,Instead, more and more sharing of pirated Apple ID,Some people might say that piracy is equivalent to a "trial" of the,Like people will naturally go into positive ...... but in fact,Because of penny share account of piracy,Led to numerous independent developers and ultimately to the vote resume。

In short,last year,Surge author[……]

Click link to continue reading...

In NSView 10.12 Detailed problem does not show shadow

On iOS,If we want to display a shadow View,So basically do:

but,To the macOS,This would not work - no effect。

The answer lies in the macOS a View If you want to use [crayon-66286d4[……]

Click link to continue reading...