iphone-sdk-3.0

Using GraphicsServices.h/GSEvent as well as compiling CLI iPhone tools with Xcode

强颜欢笑 提交于 2019-12-01 06:32:09
问题 I sent this to KennyTM (has all the private framework headers on GitHub) but I figured I'd ask here too just in case someone has some good ideas or any way to help me out. I'm trying to write a command line utility that sends GSEvents to operate the keyboard, touch/drag elements onscreen, and operate hardware buttons (volume, home, sleep, etc.) I grabbed the MouseSupport code and tried to look through it, but I couldn't find the easiest way to send GSEvents. I'm hoping someone here can help

iPhone : Insert Contact to Address book without any User Interface [duplicate]

拈花ヽ惹草 提交于 2019-12-01 06:26:50
问题 This question already has answers here : Add Contacts into AddressBook without UI (2 answers) Closed 5 years ago . I am working on Address book and Contact related functionalities. In that I want to add contacts to my device without any user interaction. Using ABPerson class we are getting some user interface but my concern is I do have contacts on my own server and I want to copy all from the server to my iPhone. So If there I will use a user interface then it will consume a lots of time. So

EXC_BAD_ACCESS on device, but fine on Simulator

强颜欢笑 提交于 2019-12-01 06:12:12
问题 I have a scroll view app which runs fine on the simulator, however, when installed on the device, it gives me an EXC_BAD_ACCESS, when i attempt to scroll one page. I have ran it through Instruments with Allocations and Leaks, but nothing is leaked and no zombies are messaged... i'm just curious what could cause such a difference in simulator vs device? Any ways to debug this, since my symbolicated crash log (partial below), doesn't seem to be very symbolicated. Exception Type: EXC_BAD_ACCESS

iphone - double tap fail safe way

青春壹個敷衍的年華 提交于 2019-12-01 05:33:51
问题 I am trying to detect double taps on a view, but when the double tap comes, the first tap triggers an action on TouchesBegan, so, before detecting a double tap a single tap is always detected first. How can I make this in a way that just detects the double tap? I cannot use OS 3.x gestures, because I have to make it compatible with old OS versions. thanks 回答1: Some excerpts from the tapZoom example of the scrollViewSuite sample code: First, the function to kick off things once the touch ended

iOS: Scroll up to refresh

痞子三分冷 提交于 2019-12-01 04:32:18
Many iOS apps have a "scroll up to refresh" feature, such as the Twitter app. If you scroll up beyond the beginning of the page or table, you'll get a message explaining how to use the feature. That controller is not from Apple but many apps seem to use it. I was told it was released for public use by a programmer, but I can't find it after a long google session. I'd be grateful if anyone can direct me to it! Thanks! Here's a link to the original code by enormego on github: https://github.com/enormego/EGOTableViewPullRefresh This is a popular implementation: https://github.com/enormego

iOS: Scroll up to refresh

假装没事ソ 提交于 2019-12-01 02:51:16
问题 Many iOS apps have a "scroll up to refresh" feature, such as the Twitter app. If you scroll up beyond the beginning of the page or table, you'll get a message explaining how to use the feature. That controller is not from Apple but many apps seem to use it. I was told it was released for public use by a programmer, but I can't find it after a long google session. I'd be grateful if anyone can direct me to it! Thanks! 回答1: Here's a link to the original code by enormego on github: https:/

How to compile pjsip for iphone 3.0

故事扮演 提交于 2019-12-01 01:53:18
I have been trying to compile pjsip for iphone 3.0 but I have been unable to do so. I have tried following the guides on siphon and voiphone (open souce iphone projects that use pjsip). And apparently I am not the only one that is unable to compile pjsip for iphone 3.0 has anyone been able to do so succesfuly?. How can it be done?. Any help will be greatly apreciated. Thank you -Oscar This page contains step-by-step instructions for compiling the latest version of pjsip for iPhone OS 3.0 (found via the discussion on this page ). Oscar, Can you try this? http://blog.pjsip.org/2009/02/19/native

How to get the model of iPhone from code. (e.g. MC143C)

北城以北 提交于 2019-12-01 01:46:33
I need to get the iPhone model number from code. I can see the model number from my iPhone which is "MC143C", but when I am retrieving this by using code it is returning "iPhone". This is the code I am using to get the model number. NSLog(@"model: %@", [[UIDevice currentDevice] model]); Can anyone please help me to have the information i want to get from my device. Thanks, !ZAQ Vanguarder import https://github.com/erica/uidevice-extension 1. define modelnumber in UIDevice-IOKitExtensions.h - (NSString *) modelnumber; 2. add the following code to UIDevice-IOKitExtensions.m - (NSString *)

“-(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data” not called

六眼飞鱼酱① 提交于 2019-12-01 01:18:47
Have a look to this code snippet:- -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { [webData setLength: 0]; } -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { NSLog(@"Recieving Data..."); [webData appendData:data]; } -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { NSLog(@"ERROR with theConenction"); [connection release]; [webData release]; } -(void)connectionDidFinishLoading:(NSURLConnection *)connection { NSLog(@"DONE. Received Bytes: %d", [webData length]); NSLog(theXML); } I am

UIModalTransitionStyle horizontal movement

亡梦爱人 提交于 2019-12-01 00:24:35
The UIModalTransitionStyle is either Vertical, Flip or Dissolve. I would like it to be right to left or left to right, like if you click on a disclosure button on a MapKit callout or in a navigation based app. This is impossible as transition for a modal viewController, but you could use a CATransition with a type of kCATransitionMoveIn or kCATransitionPush and a subtype of kCATransitionFromRight CATransition* trans = [CATransition animation]; trans.type = kCATransitionPush; trans.subtype = kCATransitionFromRight; trans.duration = 0.5; [newView.layer addAnimation:trans forKey:@