Recently doing Android version of drop-box input method,I had a problem importing the code table。Because the code table of the drop-box input method supports two encoding formats: utf8 and gb18030.,Even my own built-in code table uses a mixture of these two formats.。In Swift or Python,If you use the wrong encoding to decode text,You will receive an error。Use this method,I can do it easily[……]
Programming Development
I always use rbenv,Until this time after updating cocoapods,Execution error,of course,Visual inspection should be caused by my ruby environment being too old,So I tried rbenv install 3.0.2 ,But unfortunately,Reported an error,Go to the official warehouse of rbenv to take a look,The last version is still 2019...Okay,[……]
One of the big benefits of using SwiftUI is that you can hot update the App like Flutter,UI code changed,Will be directly reflected in the simulator or the real machine,Greatly improve the efficiency of writing user interfaces,No need to change 1px,run,Various clicks,Then check the loop of effects。But it's too early to use SwiftUI,After all, there is still a lot of iOS 12 Equipment in operation[……]
Recently, the drop grid input method has encountered several difficult to reproduce problems-the key is that it will not cause a crash。This makes the crash statistics function completely ineffective,The specific performance is that the input method will suddenly get stuck for a few seconds in some cases,Very annoying。Then I thought,macOS comes with activity manager,There is a "sampling" function,You can see the current execution (call) status of the corresponding process,Can I use it to analyze the cause of the error?
In Japan[……]
Python is a good thing,Many times we like to use it to write small things... For example, many services on my server are written in Python ( Supervisor will use your Python program becomes Services ),Accumulate,Many dependency packages are actually used。
but,These Python dependencies will not follow your [crayon-69[……]
First of all, this is not a new technology,It's very old,So old that almost no one mentions it。
This is a product of Apple's MVC model,It was born when there was no iPhone,It is used in conjunction with the Xcode graphical setting interface-such as NIB,of course,Now it has become XIB,Oh,And storyboard。
Now if you want to bind one[……]
Normal,You will encounter this error when installing a Python package,This package must be a package containing C ++ code。
This is due to incompatibility after macOS update,In General,The maintainer of this package should already be compatible with this particular situation:
|
1 2 |
if platform.system() == 'Darwin': extra_compile_args += ['-mmacosx-version-min=10.7', '-stdlib=libc++'] |
So on macOS[……]
Recently doing text statistics,Implemented in Python,Encountered an interesting problem-how to save statistical results。
Writing directly into memory is really impossible,Memory exhausted after ten hours,The program was forced to close。If you write directly to the database,Each write is too slow,It's been more than ten hours,If you go on like this, you will have to count on the week,Not a solution。
At last,I thought of a solution that does both[……]
When developing iOS apps,Many applications need to set the color of the iOS system status bar according to the current App content color,Black or white-especially on iOS 13 After the system supports the black mode。
Normal,Others will tell you to do this:
|
1 |
UIApplication.shared.statusBarStyle = .default |
But this triggers a warning:[crayon[……]
It has been a very popular self-signed certificate for HTTPS decryption,Then there are a lot of people realize crack of App by modifying Apple's internal purchase receipt。In fact Verified Purchase should be connected to the server App,Server to communicate with Apple's servers,The results are then sent to the App - but a lot of developers (including individual developers and corporate developers) do not bother to go to a special server maintenance,Therefore, the direct use of App and Apple[……]
Many people will encounter in the development EXC_BAD_ACCESS ,I'm sorry,This time, Xcode does not give any detailed solutions。
usually,This is due to a memory error caused。In simple terms it is that you create an object A,But in the later time of the visit,A memory in this area have been moved to do the system he used,For example, put the object B here - your[……]
Processing time and date software development is a very common operation,Almost all programming languages provide a corresponding API to facilitate the development of the date and time to process,Swift is no exception,such as DateFormatter ,You can use it any Date
Before,I have been so install and use pip on the macOS:
|
1 2 3 |
sudo easy_install pip3 pip3 install my_package |
later,This method is ineffective,Become such:
|
1 2 3 4 |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python get-pip.py pip install my_package |
Finally one day,I need to update it prompted pip,then:
[cray[……]
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[……]
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[……]
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[……]
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-690705910fc4e5[……]
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[……]
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[……]