Best way to have a view temporarily expand to fill the iPhone screen

I have a library that programmatically constructs a UIView that exhibits my custom behavior. This library could be dropped into many different applications at different places in the view hierarchy. Under certain circumstances the view needs to "expand" to fill the screen real estate. I am currently doing this by having my code walk the view hierarchy until I find a view with no parent, constructing a new view and inserting it as a subview of that found view, and then performing an animated t

ignoring Https SSL exception on iphone

I have a self signed SSL certificate serving out my test enviroment. I would like to do some testing connecting to the service from my iphone however, the SSL exception is causing an error. Is there a way to ignore the SSL exception on the iPhone? Edit: I should have added a bit more detail, the answers below will work hoever if i can get it to work inside NSXMLParser that would be even better.

UIView Animation iPhone (obtaining information on the frame dynamically)

I have a UIView called goalBar which is being animated by increasing the size of the frame according to a float value called destination: CGRect goalBarRect = CGRectMake(0, 0, destination, 29); [UIView beginAnimations:@"goal" context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; [UIView setAnimationDuration:2.0f]; goalBar.frame = goalBarRect; [UIView commitAnimations]; The animation works perfectly and the rectangular view increases its width over the course of the animation

Best practice to display POI in iPhone's MapKit?

Assuming I have a database of POI with their respective coordinates (longitude & latitude). What would be the "standard" way to display the POI as annotations around the user's current location? To elaborate: Given a zoom level, I guess I have to search through the database for all POI whose distance to the current location < a certain threshold, then create annotations for them. Or is there any smarter way? If the user zooms in/out, moves the map... I will need to redo the whole thing

Iphone set UIButton's buttonType programmatically

I have a UIButton which I've added in IB, however the view behind this button changes color and I need to switch the button's type between InfoDark and InfoLight. Bizarrely though, buttonType property is read only. So how can i switch between light and dark info buttons?

Xcode (iPhone) build warnings

I just installed Xcode 3.2.3. I have a first generation iPhone that I use for testing purposes. It has 3.1.3 installed on the iPhone. On the build droplist near the upper left, there don't seem to be as many choices as there were on the older version i.e. base SDK to build against. Now there is only Device/Simulator, Debug/Release as choices. When I build and try to install it on the iPhone, I am now getting a warning "The info.plist for application at (the path) specifies a minimum OS vers

Build settings in xCode that support iOS 3.0 - 4.0 and iPhone 3g - 4

I want to build an app that is compatible with iPod touches, iPhone 3g, iPhone 4, iOs3.0, etc... Everytime I build on a 3GS, I use these build settings Architectures: Standard (armv6 armv7) Build Active Architecture Only (Unchecked) Valid architectures (armv6 armv7) And I select armv7 as the active architecture before I build. However for 3G, I check the build active architecture only box and build under armv6. When I submit to the app store, will it matter what my build settings are for the f

Iphone My own (new) class not found after xcode update

I'm developing iphone app. Yesterday I updated my xcode to to newest version and clean build folders (deleted it), then created new class (nothing special): @interface EnemyFactory : NSObject { } +(Enemy *)properReferenceForName: (NSString *) name; @end Implementation is trivial and not important. What is happening now: I've got sth like this: Enemy *tempEnemy = [EnemyFactory properReferenceForName:@"enemyname"]; But code never reaches function properReferenceForName. I've got EXC_BAD_ACC

iPhone - Check if character is capital

Hey! I was wondering if there was any way to check if the first letter of a string was capital or not in an NSString. Something similar to: if ([[string substringToIndex:1] isCapitalLetter]) { // CODE } --or-- if ([self isCapitalLetter:[string substringToIndex:1]]) { // CODE }

Iphone Core Data sorting in one to many relationship

I have setup a data model where Student Entity has a name a 1-to-many relationship with Subject. Each Subject that he attends has a number of Class Times. The code below sorts it, based on the Student name, this is straight forward. NSEntityDescription *entity = [NSEntityDescription entityForName:@"Student" inManagedObjectContext:managedObjectContext]; [fetchRequest setEntity:entity]; // Edit the sort key as appropriate. NSSortDescriptor *sortDescriptor = [[NSSortDescriptor a

Memory Leaks in for loop (Objective-C iPhone)

I'm getting quite a few memory leaks with the loop in my - (void)connectionDidFinishLoading:(NSURLConnection *)connection method. Just wondering whether anyone can lead me in the right direction as to how to decrease the amount of memory leaks occurring? Perhaps it isn't the best code... any help with other areas would be greatly appreciated. // SearchViewController.h #import <UIKit/UIKit.h> #import "VenueDetailViewController.h" #import "OverlayViewController.h" #import "TBXML.h" #impor

Iphone using nstimer in viewcontroller

I have a scenario where I need to start/stop a timer on a button click. I may move from the page and come back again but the timer should be running. For this purpose I am stoping and releasing it in viewWillDisappear method and restarting it on the basis of a condition in viewWillAppear. But It is not getting started again. Following is my code: - (void)viewWillDisappear:(BOOL)animated { if([timerInterval isValid]) { [timerInterval invalidate]; //[timerInterval release]; timerInter

Iphone First timer wants to do it with Mosync

I want to learn to develop cross platform mobile/smart phone apps. I would like to go with Mosync because I am a C++ programmer but I am still unsure about some aspects of mosync. So can Mosync create apps for IPhone (from looking at the site, its table says it can but its image shows the IPhone grayed out which makes me think that IPhone compatibility is still in development or testing?). Can Mosync work with GPS on Android & IPhone platforms? Is it easy(not difficult) to compile & ru

Iphone Are there any good game editor open source for level designer?

I'm finding a good game editor open source (c/c++/objective-c) specially for level designer. At now, I know Tiled Map Editor but it only focus on tile map. In brief, I need a tool that I can design many game levels on it (design by dragging game objects (actor, wall, ball, tree, etc) to screen editor, define properties (density, restitution, friction, etc) for each objects, etc) then exporting all them to xml file and my game code will read from this xml file to generate the interface. Please

Multiple executable from same iPhone/XCode4 project

How do I create multiple executables from the same XCode4 project? I tried to create several targets with different names on the executable, but it always overwrite the existing app and change name on it instead of create a new executable...

Iphone how to get generated *.m/*.h files to be recognized in XCode4 for compilation etc?

I've got some autogenerated *.m and *.h files (from mogenerator) that I have put into a directory "mogen" in my project. What I did was add this directory into my project using "Add Files..." and the referencing approach. They now appear in the project, however classes trying to IMPORT the header files are getting "no such file or directory" How do I get, in XCode 4, the classes/header files to be compiled such that they're available to the rest of the project. For example: do I need to

Iphone How to test different iOSes in simulator

I am finally done with my app. Testing begins! It works great in the most recent 4.3.2 but when I change the device version in simulator to something lesser and launch my app it automatically reverts to the newest 4.3.2 version. How do I overcome this and ensure my app runs on all iphones? Thanks! EDIT: Figured it out! Set the deployment target in Project and Target to the lowest iOS. Next to the Run and Stop buttons, there is a drop down list "Scheme" select the deployment target. It should

Continuous capture image with AVFoudation in iPhone

Now, I can capture an image using avfoundation , like below. But how should I do to capture images (e.g. 20 or 30 images) continuously? [stillImageOutput captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler: ^(CMSampleBufferRef imageSampleBuffer, NSError *error) { CFDictionaryRef exifAttachments = CMGetAttachment( imageSampleBuffer, kCGImagePropertyExifDictionary, NULL); if (exifAttachments) { // Do something with the attachments. NSL

Iphone Taking a picture from the camera and show it in a UIImageView

I have a view with some fields (name, price, category) and a segmented control, plus this button to take picture. If I try this on the simulator (no camera) it works properly: I can select the image from the camera roll, edit it and go back to the view, which will show all the fields with their contents . But on my iphone, when I select the image after the editing and go back to the view, all the fields are empty exept for the UIImageView.I also tried to save the content of the fields in variab

Iphone JSON parsing in ios5 without array name?

Here i m putting code of my json file..can anyone help me "How to parse this json file?".I tried a lot of tutorials.I got some hints.But in my json file i dont have array i couldnt use any key value to access those objects. [ { id: 1, name: "Ice Cube", properties: [ { propertyMeta: { name: "Color", type: 5 }, value: "Venfield" }, { propertyMeta: { name: "Size", type: 1 }, value: "38" } ] }, { id: 2, name: "Lite Shirt", properties: [ { propertyMeta: { name: "Color", type: 5 }, value: "Ot

iPhone setting title on toolbar?

I have regular toolbar, with four buttons on it, and now i would like to set title to toolbar. Problem is, unlike navigation bar, toolbar doesn't have title property. Is there a way to make this?

Iphone Publish game in Apple App store for Normal and Retina displays

I developed a game using Cocos2d API for iPhone/iPod touch. My game supports normal graphics (480*320) and retina graphics (960*640). Currently I have all my graphical resources packed in single projects, for example "LoadingScren.png" and "LoadingScreen@2x.png". I guess final release would have around 50MB (the game is not very big and not very complex). Is this common scenario to have app prepared for normal graphics and retina? I mean, "LoadingScreen.png" will never be used in Retina device

Iphone uiscrollview within a uiview

I am working on an application where i need to place a uiscrollview within an uiview. The view has a fixed back ground, and in lower half of the view i have to place 30 buttons which scrolls within that area. Lets say the uiview is of 320x480, then the scrollview i have to place will be at (40, 160) to (280, 300). I just need the scroll view to have the 30 buttons inside it. so that view remains fixed, only the buttons can be selected by scrolling vertically. How can i do that? When i place th

Iphone How to write to a text file without overwriting the contents of the file?

Possible Duplicate: How to append string in local resource txt file for iOS sdk My code goes like this: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docDir = [paths objectAtIndex: 0]; docFile_V1 = [docDir stringByAppendingPathComponent:LOG_FILE_V1]; if ([file fileExistsAtPath: docFile_V1] == YES) { if(![formatedlogStr writeToFile:docFile_V1 atomically:YES encoding:NSUTF8StringEncoding error:&error]) {

Iphone Enterprise distribution of iOS applications

Does anyone know what is the best way (if any) to distribute iOS applications to enterprise. Specifically, what I am looking to do is to send my app to a few businesses but not to others. I doubt anything like that exists, but still wondering... thanks.

Can i get the name of image from the photos in iPhone

I am using image picker to pick image from gallery in iPhone device. I have to save those images in the same name that is in the gallery. I don want to name it different after picking image. I tried printing the info dictionary after picking image. Its gives image,url and path and type.. but how to get the actual name of the image any idea. Following is what i get in didFinish - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { N

iPhone App failed to install

Through the safari browser , I have added one of my org device UDID in the Developer account. Now I am trying to install one of custom application using iTunes to that device. But App failed to install. I am able to see in the Developer account that , under the profiles , it is showing 0. Why I am unable to install the app in the device. The same scenario I tried with iPad , But It got installed. Can anyone tell me what could be the reason ??

How to send parameter to a webmethod (web service) from iphone application programmatically?

I have develop a web service which provides the hospital names of a particular state inside a iphone application. In my application there are different states in table view. When a user select a particular state, I need to send the that particular state name to the web service so that it can display the hospitals belongs to that particular state. How can I achieve this???Please Help me. I stuck here for long time.....thanks in advance....

Iphone Dismissing modal view hiding view controller behind status bar

I am facing strange issue, when I am presenting any modal view say, someModalViewController on mainViewCntroller my mainViewController's 20px height is hiding behind status bar when I dismiss modal view.This problem does not occur if I rotate the simulator, but if I do not rotate simulator this problem is happening.Once I rotate simulator no matter how many times I launch modal view and dismiss it, mainViewController is appearing properly. To check where the actual problem is first I created man

Iphone MKStoreKit Restoring Non-Consumable Purchases

In my new App, I am using MKStoreKit to remove adverts. The purchasing side of it works, but as far as the Restore Function goes, nothing will work! I have properly implemented all of the Frameworks and MKStoreKit files, yet I get the error: No visible @interface for 'MKStoreManager' declares the selector 'restorePreviousTransactions' The code that I use in my restore IBAction is: [[MKStoreManager sharedManager] restorePreviousTransactions]; But it just gives me this error! I am using the

Iphone how to dismiss the popover with the bar button click

Hey there I have an in which I had to show the popover. I could easily do this. When popover of other class is shown. There is titlebar with a bar button "Done" in this popover. I want to dismiss the popover with click of done button. how can i dismiss the popover with done button? Thank you

Iphone Nslocalization for iOS 6

I have 3 to set languages in my project. So when user select one language of my 3 language application works in that specific language. I have tried to use Nslocalization but not found any solution. I have Xcode 4.5. Can anyone give me a solution?

Iphone mpmovieplayercontroller view on uitableviewcell

i want to play video on uitableviewcell. but click to player view restart video. i want to click video player view open the control menu and click to uitableviewcell restart video. - (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath{ if (self.videoPlayer && [self.indexPath_k isEqual:indexPath]) { cell.imageView.userInteractionEnabled = YES; cell.imageView.image = [cell.imageView.image Resim_Skala:CGSizeMake(150, 100)]; UIView

Iphone PhoneGap 2.7 show activityindicator in status bar

I'm using PhoneGap 2.7 and iOS 6. Whenever I load some data from my server, the activity indicator in the ios status bar doesn't appear. I always thought ios automatically takes care about that. But it seems that there is no command in javascript and the plugins are not working as well. How do i trigger the ActivityIndicator whenever I request data from the server? PS: The plugins NotificationEx and networkActivityIndicator are not working with 2.7 navigator.notification.activityStart(); and

Iphone Why is Class not appearing in blue in Xcode?

I have a class called PlayingCard. I am trying to use it in a class called PlayingCardDeck. I have imported PlayingCard.h in PlayingCardDeck.h #import "PlayingCard.h" @interface PlayingCardDeck : Deck @end When I try to call a class method in PlayingCardDeck.m it doesn't appear in blue. XCode does see the class in autocomplete but it is not in blue when selected. In this example, I am trying to call the init method.But, I get the error expected expression as if it XCode does not know what

Create images for iphone and ipad, 4 images?

When i create an image for an ImageView to iPhone, iPhone retina, iPad, iPad retina, should i create 4 images ? For example for a coin image that i use -> coin.png coin@2x.png coinIpad.png coinIpad@2x.png Can i create just the most-size image (imageIpad@2x.png) and inside Xcode select Aspect Fit ? [UIImage imageNamed:@"imageIpad@2x.png"]; Which is the common way to do this?

Iphone What can I do to avoid the app crashing when it encounters a null value?

What can I do to avoid the app crashing when it encounters a null value? the error message I get is: -[NSNull isEqualToString:]: unrecognized selector sent to instance. I tried this conditional statement to check for a null value, but it still crashes. listingWebAddress is a NSString. if (listingWebAddress == nil) { [webLabel setText:@""]; } else { [webLabel setText:listingWebAddress]; } it works fine when a "listingWebAddress" exists. thanks for the help :)

Iphone Drawing signature in ipad app and convert it in image

I am drawing signature in ipad app it works fine but problem is that when it saves image it also saves the border of the signatureView I want to save only the drawing area not complete signatureView here is my code signatureView=[[UIView alloc] initWithFrame:CGRectMake(100,100,800,500)]; signatureView.backgroundColor=[UIColor colorWithRed:242.0/255.f green:242/255.0f blue:242/255.0f alpha:1]; signatureView.layer.borderWidth =4; signatureView.layer.borderColor = [UIColor colorWithRed:23.0/25

Iphone Objective-c -> Structure Operator

While reading some tutorials i found for the first time the "structure operator", I read that it's used to refer of an instace variable. -(void)setNumber:(int)n{ self.number = n; } -(void)setNumber:(int)n{ self->number = n; } My doubt is: what it doing exactely? When do i use it? Why should i prefer it to the dot notation?

Iphone is this way to in app purchase

in my app i want to give facility of posting an advertisement through in-App purchase. for posting one advertisement user has to paid 0.99$ ( i.e. default 1 tier for india) through the In-App purchase. once he made purchase through the in -App purchase then he able to post advertisement. then for next advertisement post he has to made again new purchase. also user can purchase credits through in-app purchase. user can purchase 100 credits in 9$, 1000 credits in 80$. then user can use these cred

Iphone Facebook share dialog

I got one problem in Facebook web-dialog which i am implementing in iPhone(ios7). After Facebook login whenever i click on share button it is not opening a Facebook web dialog. But after closing the application if i run again my application and click share button it is working perfectly. I don't know what is the problem. Please help me. This is my share function [FBWebDialogs presentFeedDialogModallyWithSession:nil parameters:params

Can I use Iphone VoiceOver in xcode?

For an accessibility task I need to test the iPhone voice over, but since I don't have an iPhone is it possible to turn it on in a simulated device in xcode somehow? Thank you so much in advance!

  1    2   3   4   5   6  ... 下一页 最后一页 共 764 页