ios4

Check URL validity

Can someone confirm that checkResourceIsReachableAndReturnError method of NSUrl is working as expected. I have tried using it for known URLs and it is always returning FALSE. I am using XCode's iPhone Simulator 4.1. Thank you. ...

iPad Orientation/Frame size problem

In "View Did Load" I'm trying to determine the size of the view so I can appropriately size a subview. I want it to always stretch about the length and width of the screen regardless of orientation. quest *anview = [[quest alloc] initWithFrame: CGRectMake(50, 50, self.view.frame.size.width-100, self.view.frame.size.height-100)]; self.a...

How to add a HUD? (iOS)

I am trying to have some controls appear when you push a button and have it disappear when you press a different button. Right now the HUD is comprised of an image view, and some custom buttons in a UIView called "credits". I've managed to have it disappear using: [credits removeFromSuperview]; How do I have it reappear? ...

iPhone CoreText: Find the pixel coordinates of a substring

Here's a screenshot of the twitter app for reference: http://screencast.com/t/YmFmYmI4M What I want to do is place a floating pop-over on top of a substring in an NSAttributedString that could span multiple lines. NSAttributedString is a requirement for the project. In the screenshot supplied, you can see that links are background-hig...

ALAssetRepresentation as NSData for GIFs

I'm try to allow users to pull images out of their Photos collections using ALAssetsLibrary. Users can then upload these images. My goal is to allow users to upload any GIFs they may have in their library w/o loosing any animation they may have. For PNG and JPEG files I can grab the ALAssetRepresentation, use - (CGImageRef)fullResolut...

Scan local network to detect windows/mac/linux computers with iPhone.

I'm trying to figure how to perform some networking tasks using Objective C on the iPhone. I'd like to enumerate all network devices on my local, home network. Also, I'd like to be able to ping individual devices. Does anyone know how and what tools/libraries I can use to achieve this and other networking tasks? I've checked the iPhone ...

Using blocks in iOS4 and backwards compatibility

Hello All - If I write code in iOS SDK 4.1 and I use block notation, will it still run on an iOS 3.0 iPhone? I am suspecting not, but wanted confirmation on this. On another tip - I am a little confused about why people use blocks at all. To my (ignorant) mind, it seems like a new syntax that doesn't really allow one to do anythin...

iPhone - iOS4 - is there a Step-by-step guide on how to upgrade OLD Apps to new SDK ?

Hello, Is there a Step-by-step guide on how to upgrade OLD Apps to new SDK ? Especially, which features from old version will not work in new one? Creating this guide will help companies create toolkit for people who are struggling ...

How do I Pull in errors when attempting to tweet from an iOS app using the Twitter+OAuth API?

How do I properly setup the callback method for a status update using the Twitter+OAuth API? (http://github.com/bengottlieb/Twitter-OAuth-iPhone) Right now I'm using the following to determine if a request succeeded: - (void)requestSucceeded:(NSString *)connectionIdentifier { NSLog(@"Statuses Sent"); //[loadingActionSheet dismissWithCl...

running Video Recorder in background in iOS 4 iphone??

i am developing an application which requires recording a video in the background while the user is listening to music player in the application?? is it possible to run video recorder of iphone in the background mode automatically without prompting the user to press the record button?? ...

Orientation Problem in iPodtouch not in iPhone/iPad

hi! i have implemented application in iOS 4.0 and Provide LandScape Orientation it works fine with iPhone and iPad but gives problem in iPodtouch. i am making Universal build.Please give me some guidelines.Thanks in Advance. ...

Custom UIView rotation issues

I have a UIView that I wish to alter the size and position of when the view rotates. However, I need to be able to do this programmatically, not using layout settings and autosizing. To this end I have tried changing the frame and bounds of the view when the device rotates and calling for a redraw, but no matter what combination of varia...

iPhone custom urls and encryption

Hello stackoverflow, Quick question: Are the custom URL's passed between applications encrypted in iOS? I can't seem to find any documentation anywhere that can tell me yes or no. Thanks! ...

How can I find out if the iPhone user currently has a passcode set and encryption enabled?

I'm writing an iPhone application that requires its data to be encrypted. I've learned how to turn on encryption for files by setting the NSFileProtectionComplete attribute. I also know how to check the iPhone version to make sure they are running iOS 4.0 or better. What I've realized though, that if the user has not chosen a passcode a...

Load different html file on one UIWebView

Hi, iam going to change my UIWebView files via UISwipeGuesture but have problem : i have 100 HTML files that loaded on UIWebView , so i want implement something like this : if user swipes the view my webView will load next html file but the problem is my code just load first HTML file : NSString *path = [[NSBundle mainBundle] pathForR...

Problem playing audio file with AVAudioPlayer on iPhone 4 in iOS 4.1

I am using a simple bit of code to play an audio file: NSString *pathToMusicFile1 = [[NSBundle mainBundle] pathForResource:@"song" ofType:@"mp3"]; mySong1 = [[AVAudioPlayer alloc]initWithContentsOfURL:[NSURL fileURLWithPath:pathToMusicFile1] error:NULL]; NSLog(@"Song1 Loaded"); mySong1.numberOfLoops = -1; mySong1.volume = 1.0; [mySong1...

Is there a way to have text display on the UIActionSheet buttons the way it does from the contacts app?

When you select text message from a contact in the contact's app you get a list of phone numbers and email addresses with the 'type' also in the button, however the 'type' is styled differently. Is there a way to get this effect with UIActionSheet buttons or would I have to roll my own? ...

Draw string with NSString drawing in front of UIImageView ...

Hi! I am really new to iOS developing and need to draw a string in front of a UIImageView. I need a little flexibillity (font, color, position, size) and think that UIlabel won't fit my needs. NSString seems to do but I can't get it work. Does anybody have an example how to draw a string with NSString drawing in front of a UIImageView?...

Facebook for iPhone, background wall post

Hi, I am implementing the Facebook iOS SDK into my app... and find no problems with that. BUT, what I can't find to figure out is how to send basic wall post to my facebook app wall. What I want to do is whenever a user searches for something, the app sends a wall-post with the following text "@someUser just searched for someSearchQuer...

Create Tab bar application with Core Data enabled

Hi, I'm want to create a tab bar application with Core Data is enabled (like navigation based default apps) but it looks Xcode doesn't provide this option. Maybe I'm missing something but is it doable? (My application looks like the iPod application). ...