Skip to main content

Posts

Showing posts with the label xcode

Convert an iPhone phone number format for a "dial-able” string

I am building an iphone app that reads a phone number from the address book and dial it (with some other things of course...:)). When I load the phone numbers from the AB they are in this following format: "1 (111) 111-1111" which is not "dial-able" when using this: fullNumber = [NSString stringWithFormat:@"%@%@", @"tel:", phoneNum]; Why is that happening? What would be the best way to approach this? How could I convert the phone number into a string of digits (with no spaces or "-")? Thanks.

What control should i use when doing this in objectice C

following are my snapshot please look at it: http://bit.ly/y7U05k or below is the attached image in this snapshot i have to make the boot control like images when i click image#1 then image#1 show on the upper side UIImageView i also define on the image... image#1 .. image#1000 so please help me what control's should i use, i think i should use UIScrollView but i don't know what is the heigh and width i should take for that because UIScrollView has only game of height and width and also how to define click control on them. please help and i am very thankful if u give me the code but don't mind .. thanks I want some slider look like .. i slide the below images

Developing a new app; is maintaining iOS 4 compatibility still worth it? [closed]

I am currently in the starting phase of developing a new iOS app (for both iPhone and iPad) for a client. I'm really indecisive if I should still support iOS 4 or not. I tried to find some statistics about the adoption of iOS 5, one of the only fairly recent articles that I could find was this one. This article shows that 59,16% of all users of Bump for iPhone were using iOS 5 or later as of December 30th of last year. The (free) app will not be out for another 1.5 to 2 months, my personal guess is that the iOS 5 adoption percentage will be pretty large by then. I fully realize that there is no single answer to this question, but I would like to know what your experiences with backwards compatibility are and if you think it is worth the hassle. I would really like to use the new Storyboard functionality of Xcode and I would also really like to use ARC (although I understand that it is partially useable with iOS 4 too). The app will also use quite a bit of JSON and which is no

UIKeyboardTypeNumberPad type letters?

I really want to make a keyboard that is the UIKeyboardTypeNumberPad but instead of it showing a 4 in a textfield when pressing the 4 button, i want it to highlight the G for about 5 seconds and while its highlighted, if i press again it goes to h then to i, and for all letters, so 2 would start A then b then c if clicked multiple times? i found out on IOS they have a built in one that does this, but its not exactly the UIKeyboardTypeNumberPad and its for japanese, it will show, and type in US but still some japanese around and is hard to use because its not a true full UIKeyboardTypeNumberPad. like 0 is space or go to next letter, not on the japanese one though. so how could i code this for my application?

Attempts to tap a UIButton in a UITableViewCell using UI Automation fail with "could not be tapped”

I have an iPhone app that I'm testing using UI Automation. I have a button in a UITableViewCell but when I try to tap on it using UI Automation I get the following error. Script threw an uncaught JavaScript error: target.frontMostApp().mainWindow().scrollViews()[0].elements()[element_name].tableViews()[0].elements().firstWithPredicate(name contains[c] 'Brooklyn').elements()["detailsButton"] could not be tapped I have enabled accessibility on the button in Interface Builder and assigned the accessibility label (and identifier) "detailsButton". I can retrieve the button element and have verified that it is valid. I just can't tap it for some reason. The UIButton is a round rectangular button with user interaction enabled. Thanks for any feedback.

How to share a variable between multiple Views/XIBs

I've read several similar threads, but can't seem to figure this out - sorry. I've got a project with multiple Views, including a ViewController, several "sub" views, and a NavigationController. I'd like to have an array that is accessible from any of the Views, so that I can populate a TableView or a TextField, etc. I'd like the array to be modifiable from any View that can access it. Right now I have this in the xxAppDelegate.h file: NSMutableArray *listOfHeadings; @property (strong,nonatomic) NSMutableArray *listOfHeadings; And in the xxAppDelegate.m file I populate the array: listOfHeadings = [[NSMutableArray alloc] init]; [listOfHeadings addObject:@"Heading 0"]; [listOfHeadings addObject:@"Heading 1"]; But I can't seem to access the array from other .m files. How do I do this correctly?

i WANT to use sharekit to share images from my NSMutablearray [closed]

I am using sharekit to share images, and want to be able to share all the images upon users request not just one image I am using sharekit to share images, and want to be able to share all the images upon users request not just one image // this is the code I have for my share button UIImage *image = [UIImage imageNamed:@"Atoms"]; SHKItem *item = [SHKItem image:image title:@"Look at this picture!"]; // Make the ShareKit action sheet SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item]; // Display the action sheet [actionSheet showInView:self.view]; // this is my array I want it my sharekit will respond to all the items in the array NSMutableArray *images = [[NSMutableArray alloc] initWithObjects:@"Americans.png",@"Approach.png",@"Arianny.png",@"Atoms.png",nil];

iPhone: Notification Center Trouble

I wrote an app that allows the user to enter data in a UITextField, and one of them allows them to enter in a specific date. I'm trying to have an alert appear in the iPhones Notification Center when the date is 15 hours away, even when the app is not running at all. EDIT: New code- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UILocalNotification *localNotif = [[UILocalNotification alloc] init]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"MMdd"]; NSDate *eventDate=[dateFormatter dateFromString:eventDateField.text]; localNotif.fireDate = [eventDate dateByAddingTimeInterval:-15*60*60]; localNotif.timeZone = [NSTimeZone defaultTimeZone]; localNotif.alertBody = @"Event Tomorrow!"; localNotif.alertAction = @"Show me"; localNotif.soundName = UILocalNotificationDefaultSoundName; localNotif.applicationIconBadgeNumber = 0; [[UIApplication

sharekit to share multiple images from an NSMUtablearray [closed]

Possible Duplicate: i WANT to use sharekit to share images from my NSMutablearray i am using sharekit to share images, and want to be able to share all the images upon users request not just one image // this is the code I have for my share button UIImage *image = [UIImage imageNamed:@"Atoms"]; SHKItem *item = [SHKItem image:image title:@"Look at this picture!"]; // Make the ShareKit action sheet SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item]; // Display the action sheet [actionSheet showInView:self.view]; // this is my array I want it my sharekit will respond to all the items in the array NSMutableArray *images = [[NSMutableArray alloc] initWithObjects:@"Americans.png",@"Approach.png",@"Arianny.png",@"Atoms.png",nil];

Can anybody help me in understanding the concept of File Owner in xcode

I am unable to get the concept of File owner in xcode. Whenever I am using a ViewContoller then i specify my viewcontoller file(say MyViewController) as the file owner in the xib. Is this because i am connecting my IBOutlets in the MyViewController to the xib? But if this is the case while creating the app in the main window why we specify UIApplication as the File owner. So i guess it may not be related to the IBOutlets concpet. Even when i am customising the UITableViewCell I am using its file owner as the NSObject andthe file where i am conectingthe IBOutlets as its type. So i ma not clear what file should i specify as the File owner for a xib? Please Help. Thanks in advance

storing array of data in database in iphone

I want to store an array of data in database.Suppose i have a module called project(x) wherein 'n' number of testers 'm' number of developers are there. So in database for the project name x,i want to store n testers and m developers.. Can anyone tell me how to store this type of data.

NSAutoreleasePool

Any idea why i get these messages - "NSAutoreleasePool is unavailable: not available in automatic reference counting mode" "ARC forbids explicit message send of 'release' " import int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; }

iPhone gcc-4.2 failed with exit code 1

Help, I'm at wits end -- sometimes my Xcode runs -- sometimes it doesn't I keep getting I installed Xcode 4.1 then upgraded to 4.2 I can't even run a freshly made project :( ProcessPCH /Users/david/Library/Developer/Xcode/DerivedData/iDecide-eurvfbqsagnsmkgdvuhytbalyxkj/Build/PrecompiledHeaders/iDecide-Prefix-fjnitkqizspbsgezzdhvfinujnhz/iDecide-Prefix.pch.pth iDecide/iDecide-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd /Users/david/Documents/tmp/iDecide setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/Users/david/.rvm/gems/ruby-1.9.2-p180/bin:/Users/david/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/david/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/david/.rvm/bin:/Users/david/apache-maven-3.0.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin:/usr/local/Cellar/android-sdk

How to properly update Three20?

I've just update my version of Xcode to 4.2 - Xcode has given me a load of warnings from the Three20 source. - So I guess the version of Three20 I have must not be compatible with iOS 5? I'm using the recommended shared directory layout but have manually downloaded the files from the zip, not using git. Once I have re-downloaded the files into the shared directory, should I do anything else to update my project - run the Three20 python script?

warning: UUID mismatch detected with the loaded library

i have been getting this since updated to 5.0.1 warning: UUID mismatch detected with the loaded library - on disk is: /Users/alfredjunco/Library/Developer/Xcode/iOS DeviceSupport/5.0.1 (9A405)/Symbols/System/Library/Frameworks/CoreLocation.framework/CoreLocation i also got this one but i don't know if it matters unable to load symbol file: warning: Unable to read symbols for /Library/MobileSubstrate/MobileSubstrate.dylib (file not found). warning: No copy of MobileSubstrate.dylib found locally, reading from memory on remote device. This may slow down the debug session.