iphone

RAR Decompress on iPhone Device

Has anyone found a solution to decompressing RAR files on iPhone (not Jailbroken)? It would be great if there was a library similar to libz. I did not find anything official from RARlab. Anyone successful with integrating unRAR into their app? The source code appears to be C++? I know that this has been asked before, but I've not see...

iPhone objective-c autoreleasing leaking

I do this: NSString *fullpath = [[NSBundle mainBundle] pathForResource:@"text_file" ofType:@"txt"]; Why the following message appear? Is my code leaking? 2010-03-31 13:44:18.649 MJIPhone[2175:207] *** _NSAutoreleaseNoPool(): Object 0x3909ba0 of class NSPathStore2 autoreleased with no pool in place - just leaking Stack: (0x1656bf 0xc8...

off a sound effect with NSUserDefaults

i try to off a sound effect on my app play method is ' [myMusic play]; -(void)viewDidLoad { BOOL soundIsOff = [defaults boolForKey:@"sound_off"]; //the problem is here //xcode compiler doesn't copile this code [myMusic play] = soundIsOff; } sound code : ' ///sound effect NSString * musicSon...

iPhone TabBar selection cancelling

I am developing an iPhone app that displays several views, all acessed via Tab Bar items. However I need to add an additional item to the Tab Bar that simply launches a URL in Safari. I've accomplished this by adding an empty placeholder view to the TabBar and returning FALSE from shouldSelectViewController when the this view's tabBarI...

Calling a method in a view controller from a view

I have to invoke a method present in a view controller who's reference is available in the view. When I try to call the method like any other method, for some reason, iPhone just ignores the call. Can somebody explain as to why this happens and also how can I go about invoking this method? In the view I have this method: -(void) touc...

UITabBarController detect tab clicks

I'm creating an app using tab bar controller. It has 2 tabs. In first tab, it will have a text field and a submit button. user will enter some value in text field and clicks submit. Now my problem: on click of submit button, some result "X" is computed depending on value entered in text field and it will open second tab. here result "X"...

On-screen keyboard not appearing when editing text fields in a UIWebView

I have a web view which displays a simple login form, containing username and password fields. However when the user clicks in one of the text fields, although the cursor appears in the text field, the on-screen keyboard does not appear. I've tried registering for UIKeyboardWillShowNotifications notifications and I see this notificatio...

How do those bitmasks actually work?

For example, this method from NSCalendar takes a bitmask: - (NSDate *)dateByAddingComponents:(NSDateComponents *)comps toDate:(NSDate *)date options:(NSUInteger)opts So options can be like: NSUInteger options = kCFCalendarUnitYear; or like: NSUInteger options = kCFCalendarUnitYear | kCFCalendarUnitMonth | kCFCalendarUnitDay; Wha...

How to dynamically compose a bitmask?

Lets say I have to provide an value as bitmask. NSUInteger options = kFoo | kBar | kFooBar; and lets say that bitmask is really huge and may have 100 options. But which options I have, depends on a lot of situations. How could I dynamically compose such a bitmask? Is this valid? NSUInteger options; if (foo) { options = options ...

iPhone MPMoviePlayerController lost sound while playing video on a real device.

I am having issue with losing "video" sound while it was playing. I follow all the standard but the Video Audio sometimes got muted or just disappear at the end of the video file. Have no idea why. Does any know what might be an issue? This only happens when running the app on the real device, i can't simulate the issue on the simulator...

Can I release iphone app as a fictitious company using a developer account?

Or do I need to change to a business account and set up a DBA / LLC? ...

iPad UISPlitViewController question

Hi, It is mentioned in the Apple's documentation that if we use UISPlitViewController in our app, then that should be the root view controller. In our iPone app we are showing splash screen for some seconds till the loading of the app finishes. Once it is loaded the home screen needs to be displayed in a SplitViewController. If we use ...

Parsing Json Array of Arrays

Hi everyone, This is my first post on stackoverflow so please be patient :-) I have an Json Array of Arrays: { "response_type": "ok", "total_results": 1, "page": 1, "total_pages": 1, "sets": [ { "id": 2075184, "created": 1269989599, "term_count": 5, "has_images": false, "terms": [ ...

NSThread shared object issue

Hi, I'm getting an “EXC_BAD_ACCESS” but just can't work out why, any help would be massive - thank you in advance. The user takes a picture and I want to do some processing on it in another thread... - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { ... NSString *uid...

How can I detect device orientation going back and forth through tabs and views?

My application goes back and forth between Portrait and Landscape. I have all of my content(labels, uiimageviews, uilabels) lined up to relocate for both orientations. However, the only change when the device is actually rotated. When I cycle between tabs after it has been rotated it just shows up autosized and not the way I have it s...

UIView animation along a round path?

I need to make my little guy (in a UIIamgeView) jump forward and it has to look natural. I want to know is there a way to do it with CoreAnimation (beginAnimation/commitAnimation)? I could do it by setting a point in between in the air but the movement looks not natural :P ...

Line breaks not working in UILabel

Hi folks, I'm loading some help text from a plist and displaying the same in the form of UILabels housed in a UIScrollView. Portion of the code follows: UILabel *sectionDetailLabel = [[[UILabel alloc] initWithFrame:CGRectMake(34, myOriginForThisSection, 286, 20)] autorelease]; sectionDetailLabel.backgroundColor = [UIColor cle...

AccessoryDisclosureIndicator and AccessoryCheckmark on the left side

Hi I'm adding support for right-to-left languages for the UITableView. now I need to move the AccessoryDisclosureIndicator and AccessoryCheckmark from the right corner to the left. I'm taking the UIImageView path and Now I'm looking for 2 png icons: one for the AccessoryDisclosureIndicator arrow to the left and the second for the Acces...

Resize view on iPhone when rotating

I have an application with many views. I want only a couple of the views to be able to rotate to landscape when the device is rotated. I found out that I couldn't use (BOOL)shouldAutorotateToInterfaceOrientation because that would rotate every view in my app. I found a solution to this problem here on Stack Overflow but now I have anothe...

EASY: How does one release memory correctly in the attached C array?

Hi, I'm just trying to work out why the following code is leaking memory and I have a funny feeling that i'm not releasing the array memory correctly. This is a C function in a wider objective-c app and I'm not native to C... i've tried just using free() on the array, but have a feeling this isn't the whole story... Could someone have a...