Tuesday, July 14, 2009
Thursday, February 19, 2009
吐槽
冷漠个p,成天没事干就会无病呻吟在那边叽叽歪歪。
顾影自怜很好玩么?被害妄想很好玩么?
我就是个sb,一直就在旁边陪着过家家。
这一年多来上火的事情没有一件不是因为这些惹起来的。
天天忙着干这干那,回来还要看脸色,赔笑哄着,真不知道自己现在是怎么了,被磨的都没心气了。
好吧,还是我太心软太幼稚太能忍太健忘。什么事情想想好的时候就算了,看着眼泪的份上就过去了。
想想每次提分手的都是谁,这么严肃的事情竟然变的这么廉价。
可能我是错了,一直坚持着这么荒谬的事情。
可能我们真的不合适,只是我一直太天真,还妄想着能互相改变对方适应对方。
悲哀
Tuesday, January 13, 2009
Qt + visual studio 2005
I am following this article to setup Qt 4.4.3 on windows and integrate it with VS 2005.
The article is in Chinese, but the later VS 2005 configuration part should be easy to follow with all the snapshots it provides.
For the Qt installation part, you can search "Qt visual studio 2005" and follow the video.
Some tips to mention:
1. After Qt installation, compilation is still needed.
2. You should use "visual studio 2005 command prompt" (instead of windows cmd) to key in the commands.
3. It takes long for "configure" and even longer for "nmake"(2-3 hrs).
4. When installing Qt Visual Studio Integration, you may receive warning message saying "cannot find Qt package" or "vs 2005 service pack 1 is not installed".
For the first one, just ignore it. I have tried a simple example. So far so good.
For the second one, you should update your vs2005 (install service pack 1) first. And check your disk space for it, MS products do eat hardware.
Wednesday, December 31, 2008
some useful classes hidden in iPhone SDK 2.2
I just found a useful view called "UICalloutView". It is a cool pop-up window suitable for information briefing or hints.
What is more interesting is that it is nowhere to be found in the iPhone SDK 2.2 document. I can only find it in SDK 1.0 document, but it still can be used under iPhone SDK 2.2.
Although I don't quite understand how it works, just declare the class and its methods where you want to add this view , you can use it right away.
I found this view and the example code in xxx under category "C08 - Controls" => example 11a.
I forgot the source for xxx and will check it later. It offers really good examples for iphone development and it is totally code-based! I must admit I am still awkward in using graphical interface and makes mistakes from time to time. Codes makes me morecomfortable lol.
Labels:
hidden classes,
iPhone development,
iphone 开发,
UICalloutView,
隐藏的库类
Tuesday, December 30, 2008
iphone : how to differentiate single & multiple taps
Aim:
Make single tapping and double tapping on iphone trigger different event handling functions respectively.
page 145 has provided a solution:
Difficulty:
When you double tap, the first tap will be recognized as single tapping and trigger the single tapping handling function.
After that, the second tapping will be recognized as double tapping and trigger the double tapping handling function.
So if you rewrite touchesEnd as follows:
- (void) touchesEnd: (NSSet *) touches withEvent:(UIEvent *) event
{
UITouch *touch = [touches anyObject];
switch ([touch tapCount])
{
case 1:
[self singleTapHandlingFunction];
break;
case 2:
[self doubleTapHandlingFunction];
break;
}
}
If you double tap, both singleTapHandlingFunction and doubleTapHandlingFunction are triggered, which in most cases not desirable.
How to solve:
"iPhone OS Programming Guide 2.0"
1. In touchesEnded:withEvent:, when the tap count is one, the responder object sends itself a performSelector:withObject:afterDelay: message. The selector identifies another method implemented by the responder to handle the single-tap gesture; the object for the second parameter is the related UITouch object; the delay is some reasonable interval between a single- and a double-tap gesture.
2. In touchesBegan:withEvent:, if the tap count is two, the responder object cancels the pending delayed-perform invocation by sending itself a CancelPreviousPerformRequestsWithTarget: message. If the tap count is not two, the method identified by the selector in the previous step for single-tap gestures is invoked after the delay.
3. In touchesEnded:withEvent:, if the tap count is two, the responder performs the actions necessary for handling double-tap gestures.
An example code is provided in the following thread:
Subscribe to:
Posts (Atom)