objective-c

iPad Calendar Style Flip?

Hi All, Can anyone give me any advice on setting up the ability for a user to flip from screen to screen on the iPad. Similar to how you can flip from day to day in the default Calendar application. Can I take advantage of anything that is built in? or does this need to be custom built. Any advice or starting tips/hints would be appre...

Twitter Authentication OAuth or XAuth

I am trying to integrate Twitter into my application. My basic requirement is to have custom login screen and as twitter requires only OAuth. As per Twitter documentation I found these MGTwitterEngine(Downloaded but its missing entire OAuth library, hence could not compile) bengottlieb(cannot customize login as it is web based) XAuthT...

How to limited the UIScrollView Scroll width?

I want the UIScrollView scroll 50 px each time, how can I limited it? thank you. ...

Jump to next controller with UINavigationController on iPhone

The program has a nav bar and normally when clicking a button in viewController1 it goes to viewController2. when clicking a button in viewController2 it goes to viewController3. and the user can navigate back from viewController3 to viewController2 then to viewController1 using the back button in the navigation bar. I want to make a bu...

NSPasteboard setString:forType: returns NO under Leopard, fine in Snow Leopard

The following code is from a NSTableViewDataSource where I'm trying to impliement drag and drop. Can someone tell me why the setString:forTypes: method in the following code returns NO under Leopard? It works fine in Snow Leopard. I checked the "Pasteboard Programming Topics for Cocoa" legacy document but I can't figure out what I'm doi...

Implementing Transient Properties

Hello all, I am adding a transient property to my Core Data-based app, and I think I am missing something. In the Data Model Editor, I added a optional, transient, BOOL property called isUnderwater. In my model's header file, I added: @property (nonatomic) BOOL isUnderwater;, then I implemented these methods in the implementation file...

MPMoviePlayerViewController customization

Hi, I'm using MPMoviePlayerViewController - with the player controls set to: MPMovieControlStyleFullscreen I'm having a problem with some of buttons that are in MPMovieControlStyleFullscreen: forward, reverse, and fullscreen (the one with the arrows pointing at eachother). I would like to either remove the forward, reverse, and fullsc...

How can i format a decimal to a fraction with limits to the denominator

Hi All I am trying to format a decimal A into a fraction B + C/D, where certain limit is imposed on D, say D could be one among [2...9] or [2...19] etc. BCD are integers The goal is to get the formatted fraction as close to the decimal as possible. Is there an existing algorithm/theory on this? Or is there any API I can call on Mac SDK?...

NSWorkspace openFile: randomly brings focus back to my app

Within my Cocoa app, I call NSWorkspace's openFile: method to open some file with its default application. Sometimes this works just fine, and the other application gets focus, as it should. But alas, sometimes (the occurrence of which seems to be totally random), after the focus goes briefly to the other application, it goes quickly b...

Add/remove data to TableView datasource programmatically

HI @ll! I want to add and remove some items to my datasource for my tableview programmatically. First of all: What do I want to achieve? I habe a UIView with a TTTableView control (the Tableview from the Three20 project, but derived from the common UITableView control). This TableView is working well and has a TTSegmentedDataSource obj...

Where is MiniBrowser example

Hello, I have installed the developer tools for Snow Leopard on my Intel Imac. But i didn't find in /Developer/Exemple/MiniBrowser as explain in some web site. Where i can get this exemple ? Thank's. ...

How can I map a list of ranges to a single value?

I've only recently jumped into the world of iphone development and objective-c, so I'm still a bit lost as to how I might implement something like this. I have a float, and I have a list of ranges that float can fall within and the corresponding value I should return, eg: 10.0 - 14.5 : 1.0 14.5 - 17.0 : 2.0 17.0 - 23.0 : 2.5 23.0 - 32....

How to convert images to video on iPhone?

I'm looking for a way to convert a sequence of images to a video. And I also want to add sounds to specific time within the video. How can I do that on iPhone? Is there a library that helps? ...

AdWhirl and Admob

Hello guys! I have downloaded the latest AdWhirl and AdMob SDK. Read and done with the instructions in the AdWhirlSDKInstructionsforiPhone.pdf I have the following errors: 1. AddRunningClient starting device on non-zero client count 2. Unable to fill ad request. This is a common situation. 3. <AdMob> Must implement required method -cu...

how do i compile a C++program to work in the windows operating system using g++ for linux?

I am new to writing programs in c++ and i want to know if there is a way to export it to a windows format. Also what is a good way to learn objective-c, is it very different from c++? Thank you in advance. ...

How to make UniversalIndentGUI handle @interface xxx : yyy {} statement properly?

I'm playing with UniversalIndentGUI to format obj-c code as I want it to be formatted. Since i came from .NET world I want to format @interface declaration like @interface ManagedObjectCell : UITableViewCell { } Not like @interface ManagedObjectCell : UITableViewCell { } But i didnt find the option in UniversalIdentGUI to specify...

Unable to access data in one class from another class

Here is the class which gives me a modal view of the camera @interface ViewController : UIViewController <UIImagePickerControllerDelegate> { UIImagePickerController *cameraView; // camera modal view BOOL isCameraLoaded; } @property (nonatomic, retain) UIImagePickerController *cameraView; - (IBAction)cameraViewbuttonPressed; - (voi...

Finding all active threads

I need to find a way to enumerate all my iPhone application's active threads. This is strictly for debug purposes. Private APIs, if any, are welcome as well. I know I can see all the current threads in the debugger window, but I would like to have access to the actual NSThread objects, if that is at all possible. ...

Objective-C and C

Hi! I try to use the "libmsrp", but when I try to compile the library, I have the following error: $ make so gcc -ggdb -shared -Wl,-soname,libmsrp.so.0 -o libmsrp.so.0.0.2 msrp.o msrp_session.o msrp_message.o msrp_relay.o msrp_switch.o msrp_callback.o msrp_network.o msrp_utils.o -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-...

How to add animation on the UIButton?

I want to change the UIButton background color from black to white color. But I want to change it in animation. For example... black > grey > white. Is there any simple way to do so in iPhone SDK? thank you. ...