Pull to Refresh UIViewController in iOS
If you try to add a UIRefreshControl
to a UIViewController
, youโll get an error.
UIRefreshControl can only be managed by a
UITableViewController
.
So, hereโs a trick.
If you try to add a UIRefreshControl
to a UIViewController
, youโll get an error.
UIRefreshControl can only be managed by a
UITableViewController
.
So, hereโs a trick.
In class B, a method needs to pass a value to A and perform certain actions.
How can this be implemented?
First, B needs to know who to pass the value to and then call A.aFunc().
I understand that you want to know the principle without looking at the code, so Iโll simplify it as much as possible.
There are already many comparison data available online, but nothing is as reliable as doing it yourself. So, I set up two โHello Worldโ applications, one using Sinatra and the other using Martini, on a VPS. I used Siege, a testing tool for Linux, to compare their performance.
Considering that Iโve read nearly five hundred books, Iโve always wanted to use a few paragraphs to introduce the concept of speed reading.
But then this series was delayed and never happenedโฆ
I guess itโs because of my limited skills that I canโt write itโฆ
Better do something else first.
With the increasing complexity of modern magic spells, a successful project often needs to be calculated in months. Those experienced wizards who understand this concept are respected as the โmyth of man-monthsโ.
In this environment, mental strength is precious and important for magicians.
Speaking of mental strength, it is actually pronounced as โWillPowerโ in the elven kingdom. However, after being translated to the celestial empire by unknowing Muggles, it has been translated as โself-controlโ or โwillpowerโ.
It sounds mysterious and grand, but it can be understood by focusing on two characteristics:
The last sentence blew my mind.
This reminds me of a humorous response by Zhang Xiaolong on Zhihu to the question โIf the world were just a piece of code, what bugs have you discovered so far?โ
It is unrealistic to expect a variable in the code to check for bugs in the code.
All along, Iโve been curious.
In the eyes of the public, programmers are generally seen as dull and logical, immersed in their own world, silent, high IQ but low EQ, constantly debating which programming language or framework is better than another.
Oh, and thereโs another important point: no girls.
This has always confused me, and for a while I sincerely disagreed with this label.
Because when looking at some foreign elites, they not only have exquisite coding skills, but also write blogs, publish books, do marketing, start companies, raise funding, go diving, climb mountains, travelโฆ
And itโs not just a passing interest, it can only be described as extraordinary.
Are they still programmers?
I only understood this after reading this book, these people are called: Hackers.
Oh my god, I finally finished reading it, more than 1000 pages!!!
I manually typed about 80% of the code and found two bugs in the code.
If there are any mistakes, you can submit a Pull Request
on oreillymedia/iOS7_Programming_Cookbook on Github.
While reading iOS 7 Programming Cookbook, I suddenly wondered how many lines of Obj-c code I wrote.
Before, when I was still using the Windows operating system, I used SourceCounter to do this.
However, SourceCounter doesnโt support Mac OS X.
So, I found an interesting command line:
1 | find . -name "*.m" -or -name "*.h" | xargs grep -v "^$" | wc -l |