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。

Put a picture

Obviously,This is the cheapest way - in fact the most expensive。It requires you to do a series of rounded picture for each button,[……]

Click link to continue reading...

OwnCloud build private clouds with personal

Background account

According to regulations of the country,All network disk must be reviewed! (Probably because too much goddess,You know = _ =),Then have stopped most of the network disk service,Now only some of the big manufacturers still operating in the cloud。but,You keep to a certain degree in the cloud all the information must be subject to review (the goddess of the film becomes 15 seconds educational films,It is light;If you say dang good,Or to save the file to a similar degree in the cloud,Tomorrow someone will come to your courier delivery…)and so,Against this background environment,I need to own a network disk (whatever you need to do not need,I need at least[……]

Click link to continue reading...

iOS custom keyboard around the keyboard to move the cursor implement

Until we are,For example, third-party input method Sogou input method has a classic gesture - paddling around on the keyboard to move the cursor。And this feature I am also very common,so,I want to implement it yourself。

The first thing I think of is UISwipeGestureRecognizer ,However, with predictable results,Paddling can only move the cursor one space,This is not what I want。

It seems the only way is to use UIPanGestureRecognizer[……]

Click link to continue reading...

With Santa prevent Mac QQ start of Jietu.app

Update,The name of the new version of qq screenshot changed,To QQ jietu plugin.app ,Directory unchanged。

The following commands have been made corresponding modification。

We all know that QQ this thing and 360 A sample,Do no good,。A Mac version is also thought to function well with,First touches hooligan playing up。After this update,You will find QQ screenshot function independent of the (actually very early independence,I refer to the other),Network connection is not present and QQ[……]

Click link to continue reading...

Swift in regular expressions

At the beginning of a,Swift did not provide regular expression support,So we can only package,For example write a structure,Like this:

In fact, Swift already has support for regular expressions,We just need to:

Direct will be able to get the captured content。

 

Gets to be a[crayon[……]

Click link to continue reading...

Swift set cut scores

in most cases,If we want to get the contents of a section of the array (for example, front-to-middle,Some of the values ​​of the array or the last),This time you need to traverse the array to assign a new array:

Such an array of short, better said it does not matter,However, if the array is relatively large and we need to value and more,It is clear that it is a waste of time to traverse up。

Swift in itself provides an array of features split,This mechanism is called [crayon-6725a9[……]

Click link to continue reading...

Let go pip Agent

When using python,Often you need to download some third-party framework,Fortunately, python has a similar apt package management tool,pip。

but,Although management packs can pip,But no source switching mirror,And we downloaded package,Most of the large foreign code hosting server,This often leads to a few hundred KB of package to download one hour。

 

Here we assume that,As a programmer you,Have been deployed to the computer HTTPS and HTTP proxy,We also said before[……]

Click link to continue reading...

What is Larry?

Pocketed double input method input method is a professional,It worked to make the user experience the pleasure double input, and also both spelled all the advantages--such as mass lexicon。

For double recognition,You should no longer stay in the words between the coincident code rate of spelling and five this concept,Larry is stylish、Line with the instincts of a Chinese pronunciation input method。

Spelling

To introduce double,We are starting from your most familiar spelling。Need to know,Such symbols abcd did not originate in China,natural,China did not start so similar English phonetic spelling。later,In order to develop Mandarin[……]

Click link to continue reading...

"Plugin invalidated" ios Customize Keyboard

Home for iOS system does not seem to be willing to write an input method,Except for a few oligarchs other than large companies do nothing else。Approaching China's unique Apple ecological platform,Find inside are empty shells,Meaningful applications is really very little of。

Pocketed blog recently is working to write in the first paragraph can really support the iOS platform the code table of double input method,First compatible double nature of the programme is open to the "Chick double",It stepped on a lot of holes,Will send some experience。Now,Emergency record a hole:

Using the keyboard,Occasionally[……]

Click link to continue reading...