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,Creating a class to decorate a dictionary might be a good choice but too much trouble,Then start from the agreement。

Conditional agreement to follow

We can give the dictionary[……]

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 underlying rendering there such a mistake,Once your layout there was not an integer or decimal point,It will lead to blurred text rendering。

that[……]

Click link to continue reading...

In the end "Larry" is a what?

This article first appeared inDigital lychee,Formerly known as "in the end" Larry "is a what? Larry input method developers listen to you say "

Just last weekend,I recommend Larry input to a new friend,He is the kind of concern in this respect has never been a man - even the "spelling" concept,Also I know after I introduced him to Larry - "So I have been called by spelling (phonetic) Input Method"。

It is this matter,It prompted me to write this article hands。As a developer Larry input method,Speak the truth,I was also very "catch chicken",We often say that high efficiency Larry、double[……]

Click link to continue reading...

Subscribe to a paid app shelves,In addition to code for what you need to do?

Finally,Pocketed X input method successfully shelves。From development to shelves,A lot has happened。

Now,I would say it,In addition to the code,Added a subscription fee app,You need to do something。

Use Agreement

In General,Apple provides to youUnified Software Use Agreement,In your correspondence on the app "app infomation" page,There is a right of the License Agreement。

If you want to offer subscriptions purchased,We need to use your own protocol before they can use,You need a[……]

Click link to continue reading...

When we talk about privacy,What in the end say?

Privacy is a very wonderful thing,When you're a person,It does not exist。

TenSteps

Today, the Internet widespread anxiety about privacy,Often someone shouting "To protect privacy," followed by ...... but some people will say "I have nothing to hide."。Faced with this discouraging reply,Privacy advocates in addition to the heart deep sense of powerlessness,There is confused。

This privacy thing,In fact, before the Internet existed,For example, the law does not allow unauthorized demolition of reading other people's letters - this is to protect your personal privacy。

Before the Internet,Privacy communication needs[……]

Click link to continue reading...

Software under my luck elsewhere,Why should I pay?

This article first appeared in Niche software,Now I recorded it in his blog。

A few days ago off the grid when the input method and X in various media collaborated hair code engaging in activities,Unexpectedly, we share Apple ID and a number of public platform for cooperation,Send out a wave of lottery activities code。

"Forefoot says he was forced to change the business model of piracy problems,I ran back foot and made pirated software micro-channel public number Cooperative Extension,He is simply playing to his face。”

Eventually, after one day I discovered this fact,Then the first time we withdraw the draft,The event canceled[……]

Click link to continue reading...

R0uter Input Tool:I will buy the APP,But I do not want to GG

Article was originally titled "If this input method no longer able to make ends meet me,I went home to sell sweet potatoes. "

People say you want to sell a good App,Gotta equipped with a moving story,Last year, in an interviewIf no one buys the next month my App,I have to GGTie the hearts of many people - accidentally said a big truth,Many people find it difficult to accept this reality。- people are moving to the,Is the angle seems a little problem hhh

I do not want to accept this reality - but the reality is this,Larry user market even smaller than I expected a little bit,Just two years,Downloads pocketed input method has been[……]

Click link to continue reading...