Search Results

Search found 15866 results on 635 pages for 'iphone 4g'.

Page 212/635 | < Previous Page | 208 209 210 211 212 213 214 215 216 217 218 219  | Next Page >

  • a Problem to pass a string between 2 view controller (iPhone)

    - by Toma
    my problem is quite simple, but as a beginner, I'm lost :D I have to view controller : view one call view 2 like this : self.FacebookTypeRequest =@"favoris"; FaceBookViewController *viewcontrol = [[FaceBookViewController alloc]initWithNibName:@"FaceBookViewController" bundle:[NSBundle mainBundle]]; viewcontrol.title = @"FaceBook"; [self.navigationController pushViewController:viewcontrol animated:YES]; [viewcontrol release]; How can i send my string facebookTypeRequest to my view controller 2 ? Thanks for your help

    Read the article

  • How to use tags in iPhone application code ?

    - by srikanth rongali
    I need to access the [indexPath row] outside the tableView method. I need to use it in my own method in same class and other classes also. How can I do it. If the cell in the table view have buttons, By selecting the buttons how can I say which row was selected ? I think of using the tags. But, I do not know much about tags. Thank you.

    Read the article

  • Permanent file changes on iPhone simulator

    - by Cesar
    I'm in trouble with paths, relative paths, NSBundle and all the path/file related operations :) While i run the simulator everthing goes right but all the file changes are not permanent, so everytime i run my app i have to repeat the initial setup of my app. The question: What is the proper way to read and write files (from resource dir) and make all the file changes permanent (updated into the project folder) ? Thanks

    Read the article

  • Iphone calendar integrating problem

    - by Rkm
    I am integrating calendar to my application , after adding calendar i am getting error , please help me anyone where it is problem . "_OBJC_CLASS_$_KalViewController", referenced from: objc-class-ref-to-KalViewController in FertilityAppAppDelegate.o "_KalDataSourceChangedNotification", referenced from: _KalDataSourceChangedNotification$non_lazy_ptr in EventKitDataSource.o (maybe you meant: _KalDataSourceChangedNotification$non_lazy_ptr) "_OBJC_CLASS_$_EKEventViewController", referenced from: objc-class-ref-to-EKEventViewController in FertilityAppAppDelegate.o

    Read the article

  • iPhone/iPad - issues with NavigationBar button ?

    - by user532445
    I my application i have added button in NavigationBar like this.. UIBarButtonItem *more=[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"search-25by25.png"] style:UIBarButtonItemStylePlain target:self action:@selector(SelectMission:)]; self.navigationItem.rightBarButtonItem = more; When i am clicking on button application get's shutdown... If i am doing same thing with normal button it's working fine can any one help me why it's behaving like this?

    Read the article

  • AdWhirl implementation in iPhone Cocoa touch

    - by user571283
    Hi dudes, i'm starting to implement AdWhirl in my application. i follow the instructions which is belong to adwhirl but i cant see any ad in my application.i add the following methods in my viewcontroller class - (void)viewDidLoad { [super viewDidLoad]; AdWhirlView *adView=[AdWhirlView requestAdWhirlViewWithDelegate:self]; [self.view addSubview:adView]; } -(NSString *) adWhirlApplicationKey{ return @"myAdWhirlKey"; } -(UIViewController *) viewControllerForPresentingModalView{ return self; } i doesn't display anything. please help how to implement AdWhirl

    Read the article

  • iPhone UITextView leaves room for 2 lines at the bottom

    - by Ton
    Hi Guys, When i start typing text in a default textView in my viewcontroller, its not going to the bottom of the textfield. It leaves room for 2 more lines of text and then starts scrolling. I want it to start scrolling when i start going beyond the last line. I tried everything, and i dont know what i can do? Anyone any ideas?

    Read the article

  • iphone: memory problems after refactor

    - by agilpwc
    I had a NIB with several view controllers in it. I modified the code and used Interface Builder decomose interface to get all the view controllers in their own Nib. But now with empty core data database, I'm getting "message sent to deallocated instance" errors. Here is the code flow: From the RootViewController this is called: if (self.dogController == nil) { DogViewController *controller = [[DogViewController alloc] initWithNibName:@"DogViewController" bundle:nil]; self.dogController = controller; [controller release]; } self.dogController.managedObjectContext = self.managedObjectContext; [self.navigationController pushViewController:self.dogController animated:YES]; Then in a dogController a button is pressed to insert a new object and the following code is excuted and the error hits on the save, according to the trace NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext]; NSEntityDescription *entity = [[self.fetchedResultsController fetchRequest] entity]; NSManagedObject *newManagedObject = [NSEntityDescription insertNewObjectForEntityForName:[entity name] inManagedObjectContext:context]; // If appropriate, configure the new managed object. [newManagedObject setValue:[NSDate date] forKey:@"birthDate"]; [newManagedObject setValue:@"-" forKey:@"callName"]; // Save the context. NSError *error = nil; if (![context save:&error]) { Then the error produced in the console is * -[JudgeViewController numberOfSectionsInTableView:]: message sent to deallocated instance 0x598e580 I'm racking my brain for hours and I can't figure out where my minor changes made something messed up. Any ideas?

    Read the article

  • getClientRects javascript method supported on iPhone?

    - by genericdan
    Trying to find the top-most visible element in a UIWebView. I am using a JS method to do this, which works great in Safari, but never executes past the getClientRects method when executed from a UIWebView. The elements I'm interested are all of class="h". Here's the javascript which is called from [webView stringByEvaluatingJavaScriptFromString:@"findTopElement()"]; Javascript: function findTopElement() { var pars = document.getElementsByClassName("h"); alert("findingTopElement: num pars:" + pars.length); for (var i = 0; i < pars.length; i++) { var para = pars[i]; alert("checking par " + para.id); var rects = para.getClientRects(); alert("checking rects " + rects.length); for (var j = 0; j < rects.length; j++) { var r = rects[j]; if (r.top > 0 && r.bottom > 0) { alert("success: " + para.id); return para.id; } } } return -1; } Is it possible element getClientRects function is not supported in a UIWebView?

    Read the article

  • Unit Testing in iphone i got below error.

    - by Pradeep
    whenever i run the unit testing application to find whether appdelegate is there r not using the test suit -(void)testAppDelegate { id app_delegate=[[UIApplication sharedApplication]delegate]; STAssertNotNil(app_delegate,@"delegate not found"); } i got this error. Please help. "_OBJC_CLASS_$_UIApplication", referenced from: objc-class-ref-to-UIApplication in Tests.o ld: symbol(s) not found collect2: ld returned 1 exit status

    Read the article

  • iPhone settings screen

    - by malleswar
    Hi Friends, I want to design a screen like settings screen. Like in grouped uitableview I want to place the controls. Can any one please provide me any application sample or code ? Thanks in advance. Regards, Malleswar

    Read the article

  • iPhone - sorting the results of a core data entity

    - by Digital Robot
    I have a core data entity that represents the attributes of a product, as number, price, etc. The product number is a NSString property and follows the form X.y where X is a number variable of digits and Y is one digit. For example. 132.2, 99.4, etc. I am querying the database to obtain the list of product numbers in order: The code is like this: + (NSArray*)todosOsItens:(NSString *)pName inManagedObjectContext:(NSManagedObjectContext *)context { Product *aProduct = [Product productWithName:pName inManagedObjectContext:context]; NSArray *all = nil; NSFetchRequest *request = [[NSFetchRequest alloc] init]; request.entity = [NSEntityDescription entityForName:@"Attributes" inManagedObjectContext:context]; request.predicate = [NSPredicate predicateWithFormat: @"(belongsTo == %@)", aProduct]; [request setResultType:NSDictionaryResultType]; [request setReturnsDistinctResults:YES]; [request setPropertiesToFetch:[NSArray arrayWithObject:item]]; NSSortDescriptor *sortByItem = [NSSortDescriptor sortDescriptorWithKey:@"ProductNumber" ascending:YES]; NSArray *sortDescriptors = [NSArray arrayWithObject:sortByItem]; [request setSortDescriptors:sortDescriptors]; NSError *error = nil; all = [[context executeFetchRequest:request error:&error] mutableCopy]; [request release]; return all; } but this query is not returning the sorted results. The results are coming on their natural order on the database. How do I do that? thanks.

    Read the article

  • iPhone CoreData Migration and modifying data

    - by ScottL
    I have an app that has both static data and user entered data in the CoreData store. I understand how to do a lightweight migration to a new database version, but how to I add or modify the static data without affecting the users data? If I have 50 static data entries to add and a couple to modify (ie. spelling mistakes) should they be stored in a different sqlite db and copied over? Also, is it possible to look at the version of the data store so that this copy only happens the first time the app is started up after upgrading? Sorry for the general noob type question, but this is the first time I have ever had to deal with this sort of issue. Thanks, Scott

    Read the article

  • class/lib for parallel donwloads on iphone

    - by lope
    Hi there! I need some class or lib that would allow me to run multiple parallel downloads. I didn't have luck finding any, do you guys know about something useful? I need to add new files to download dynamically, so something that only get initialized with urls at the beginning won't help me much. Any help would be greatly appreciated. I tried to create my own, but I had some problems with it. So I figured I would try to get something that is already done.

    Read the article

  • Parse xml file with same tag multiple times iphone sdk

    - by neha
    Hi all, In my application, I have a tag multiple times. I'm using xml parser. I'm taking a corresponding element with similar name as the one in xml file in my class. So in case of: <photo>abc</photo> <photo>def</photo> What I get in photo element of my class is the second element i.e def, as the first one gets overwritten as there's only one photo element in my class. My question is am I wrong in taking similar elements in class as in case of xml? Is there any better method or a better parser? Or I'm on right path and have to do this manually by setting some flags etc? Thanx in advance.

    Read the article

  • related to gdata in iphone

    - by sandhya
    my application is working fine in simulator but when i tried to build it on ipod it is giving some error i.e., "_OBJC_CLASS_$_GDataServiceGoogleSpreadsheet", referenced from: __objc_classrefs__DATA@0 in spreadsheetViewController.o and "_kGDataGoogleSpreadsheetsPrivateFullFeed", referenced from: _kGDataGoogleSpreadsheetsPrivateFullFeed$non_lazy_ptr in spreadsheetViewController.o

    Read the article

  • Making a grid on iPhone using Opengl

    - by TheGambler
    I'm trying to make a grid similar to what you would see in these geo games(geoDefense/geometry wars). I'm wanting to apply separate transformation matrixes to each to create different effects. So, it makes since to me that I need to draw each square separately to that I can apply a different transformation to each one. The problem I'm having is mapping these grids out or connecting the squares. The coordinate systems is still confusing to me. I know it would be easy just to create a huge triangle strip but I'm not able to figure out a way to apply separate transformations to each square( quad ) if I use triangle strips. So first question: Can you apply different transformations to quads if you use a triangle strip to draw a huge grid? If so, any tips suggestions on how to do so? If not, how does one usually connect textures without using triangle strips? Here is my coord setup: const GLfloat zNear = 0.01, zFar = 1000.0, fieldOfView = 45.0; GLfloat size; glEnable(GL_DEPTH_TEST); glMatrixMode(GL_PROJECTION); size = zNear * tanf(DEGREES_TO_RADIANS(fieldOfView) / 2.0); CGRect rect = view.bounds; glFrustumf(-size, size, -size / (rect.size.width / rect.size.height), size / (rect.size.width / rect.size.height), zNear, zFar); glViewport(0, 0, rect.size.width, rect.size.height); Here is my draw: - (void)drawView:(GLView*)view; { int loop; //glColor4f(1.0, 1.0, 1.0, 0.5); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Grid Loop for( loop = 0; loop < kNumberSectionsInGrid; loop++ ) { //glLoadIdentity(); static Matrix3D shearMatrix; Matrix3DSetShear(shearMatrix, 0.2, 0.2); static Matrix3D finalMatrix; //Matrix3DMultiply(temp2Matrix, shearMatrix, finalMatrix); glLoadMatrixf(shearMatrix); glTranslatef(-1.0f,(float)loop,-3.0f); glScalef(0.1, 0.1, 0.0); Vertex3D vertices[] = { {-1.0, 1.0, 0.5}, { 1.0, 1.0, 0.5}, { -1.0, -1.0, 0.5}, { 1.0, -1.0, 0.5} }; static const Vector3D normals[] = { {0.0, 0.0, 1.0}, {0.0, 0.0, 1.0}, {0.0, 0.0, 1.0}, {0.0, 0.0, 1.0}, }; GLfloat texCoords[] = { 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0 }; glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glBindTexture(GL_TEXTURE_2D, texture[0]); glVertexPointer(3, GL_FLOAT, 0, vertices); glNormalPointer(GL_FLOAT, 0, normals); glTexCoordPointer(2, GL_FLOAT, 0, texCoords); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); } } glMatrixMode(GL_MODELVIEW);

    Read the article

  • Problem in calling a function from different class using protocols-iphone

    - by Muniraj
    I use cocos2d for my game. In which I play a movie and have a separate overlay view for controls.The touches are detected in the overlay view. Now when the touches are detected the function in the game code has to be invoked. But the function is not detected and there is no error. I dont know what has gone wrong. Someone please help me. The code are as follows The protocol part is @protocol Protocol @required -(void) transition1:(id) sender; @end The function which is to be invoked in the game code is (void) transition1:(id) sender { [[Director sharedDirector] replaceScene: [ [Scene node] addChild: [Layer4 node] z:0] ]; } The code in the overlay view in MovieOverlayViewController.h import "Protocol.h" @interface MovieOverlayViewController : UIViewController { UIImageView *overlay; NSObject <Protocol> *transfer; } @end The code in the overlay view in MovieOverlayViewController.m @implementation MovieOverlayViewController (id)init { if ((self = [super init])) self.view = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]; return self; } -(void) viewWillAppear:(BOOL)animated { overlay = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"overlay.png"]] autorelease]; [self.view addSubview:overlay]; } (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint point = [touch locationInView:self.view]; NSLog(@"pointx: %f pointy:%f", point.x, point.y); if (CGRectContainsPoint(CGRectMake(1, 440, 106, 40), point)) { // the function is called here [transfer transition1: nil]; } else if (CGRectContainsPoint(CGRectMake(107, 440, 106, 40), point)) NSLog(@"tab 2 touched"); } (void)dealloc { [overlay release]; [super dealloc]; } @end

    Read the article

  • iPhone and iPad : Doing a "select * from something" query in a SQLite database

    - by Abramodj
    Hi folks, i'm trying to use the SQLite data base in my iPad app, and here's my function to make a query: - (void)executeQuery:(char*)query { NSString *file = [self getWritableDBPath]; NSFileManager *fileManager = [NSFileManager defaultManager]; BOOL success = [fileManager fileExistsAtPath:file]; // If its not a local copy set it to the bundle copy if(!success) { //file = [[NSBundle mainBundle] pathForResource:DATABASE_TITLE ofType:@"db"]; [self createEditableCopyOfDatabaseIfNeeded]; } dataArray = NULL; dataArray = [NSMutableArray array]; sqlite3 *database = NULL; if (sqlite3_open([file UTF8String], &database) == SQLITE_OK) { sqlite3_exec(database, query, loadTimesCallback, dataArray, NULL); } sqlite3_close(database); [self logResults]; } if I call [self executeQuery:"select name from table1"]; everything is working fine. But if i call [self executeQuery:"select * from cars"]; the app crashes telling me that the NSMutableArray dataArray is not the right kind of variable where to set the query results. So, how can i do a "select * form table1" query, and store the results? Thanks! EDIT: Here's my loadTimesCallback method: static int loadTimesCallback(void *context, int count, char **values, char **columns) { NSMutableArray *times = (NSMutableArray *)context; for (int i=0; i < count; i++) { const char *nameCString = values[i]; [times addObject:[NSString stringWithUTF8String:nameCString]]; } return SQLITE_OK; }

    Read the article

  • iPhone xcode array losing state after load

    - by Frames84
    Right i've had a search around and can't find anything. @synthesize list; // this is an NSArry -(void) viewDidLoad { NSArray *arr = [self getJSONFeed]; self.List = [arr retain]; // if i copy the access code into here it works fine. } -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger row = [indexPath row]; NSArray *vals = [list objectAtIndex:row] retain]; NSString *id = [vals valueForKey:@"id"]; // ERROR } right i've taken some of the code to try and provide it as simple as possible, ignore typo's and memory leaks this is sorted. Basically when I select a row I can't get data out of my 'list' array object. Please can anyone help me out?

    Read the article

  • Draw points in a view on iPhone screen?

    - by micropsari
    Hello, in my class I have an attribute IBOutlet UIImageView *imageView; And if I want to draw an image in this view I do : imageView.image = [UIImage imageNamed:@"foo.png"]; But how can I do to draw some points with coordinate x, y (in pixel) directly in the view ? Thanks !

    Read the article

< Previous Page | 208 209 210 211 212 213 214 215 216 217 218 219  | Next Page >