Search Results

Search found 15682 results on 628 pages for 'iphone'.

Page 156/628 | < Previous Page | 152 153 154 155 156 157 158 159 160 161 162 163  | Next Page >

  • Web Url contains Spanish Characters which my NSXMLParser is not parsing

    - by mAc
    I am Parsing Web urls from server and storing them in Strings and then displaying it on Webview. But now when i am parsing Spanish words like http://litofinter.es.milfoil.arvixe.com/litofinter/PDF/Presentación_LITOFINTER_(ES).pdf it is accepting it PDF File Name ++++++ http://litofinter.es.milfoil.arvixe.com/litofinter/PDF/Presentaci PDF File Name ++++++ ón_LITOFINTER_(ES).pdf i.e two different strings... i know i have to make small change that is append the string but i am not able to do it now, can anyone help me out. Here is my code :- - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict { currentElement = elementName; if([currentElement isEqualToString:@"category"]) { NSLog(@"Current element in Category:- %@",currentElement); obj = [[Litofinter alloc]init]; obj.productsArray = [[NSMutableArray alloc]init]; } if([currentElement isEqualToString:@"Product"]) { obj.oneObj = [[Products alloc]init]; } } - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { if([currentElement isEqualToString:@"Logo"]) { obj.cLogo=[NSString stringWithFormat:@"%@",string]; NSLog(@"Logo to be saved in Array :- %@",obj.cLogo); } if([currentElement isEqualToString:@"Name"]) { obj.cName=[NSString stringWithFormat:@"%@",string]; NSLog(@"Name to be saved in Array :- %@",string); } if([currentElement isEqualToString:@"cid"]) { obj.cId=(int)[NSString stringWithFormat:@"%@",string]; NSLog(@"CID to be saved in Array :- %@",string); } if([currentElement isEqualToString:@"pid"]) { //obj.oneObj.id = (int)[NSString stringWithFormat:@"%@",oneBook.id]; obj.oneObj.id = (int)[oneBook.id intValue]; } if([currentElement isEqualToString:@"Title"]) { obj.oneObj.title = [NSString stringWithFormat:@"%@",string]; } if([currentElement isEqualToString:@"Thumbnail"]) { obj.oneObj.thumbnail= [NSString stringWithFormat:@"%@",string]; } // problem occuriing while parsing Spanish characters... if([currentElement isEqualToString:@"pdf"]) { obj.oneObj.pdf = [NSString stringWithFormat:@"%@",string]; NSLog(@"PDF File Name ++++++ %@",string); } } - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if([elementName isEqualToString:@"category"]) { NSLog(@"Current element in End Element Category:- %@",currentElement); [TableMutableArray addObject:obj]; } if([elementName isEqualToString:@"Product"]) { [obj.productsArray addObject:obj.oneObj]; } currentElement = @""; } I will be thankful to you.

    Read the article

  • Is it possible to tie a subscription to a iTunes account with in-app purhcase?

    - by erotsppa
    We're trying to implement a subscription service with in-app purchase in our app. The problem is our service does not require a user account for the past year of service. Users simply use this service with advertisements shown. We want to give them a subscription where they can buy for say, 3 months to have the advertisement removed. How can this be done? We'll have to make it a consumable because it is a subscription. But we wouldn't know when the subscription end. We can't save the state locally because the user might reinstall the app We can't save the state on the server and tie it to their device because sometimes the user changes device We don't have a user account to tie the subscription to and we don't want to introduce a user account system which spoils the experience. Is there some way of associating the purchase with their iTunes account? So that it is carried with them when they reinstall or changes device?

    Read the article

  • "reset" cells after changing orientation

    - by Christian
    Hi, I added the interfaceOrientation to my app. It works fine concerning the views. Some of the table-cells I defined by CGRects to position the text in the cell. In portrait-mode the cell is 300px long, in landscape-mode 420px. I use the following code to change the CGRects depending the orientation: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.interfaceOrientation == UIDeviceOrientationPortrait) { NSString *currentLanguage = [[NSString alloc] initWithContentsOfFile:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/sprache.txt"]]; static NSString *TableViewTableCellIdentifier = @"TableViewTableCellIdentifier"; UITableViewCell *cell = (UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:TableViewTableCellIdentifier]; CGRect cellRect = CGRectMake(0, 0, 300, 175); cell.backgroundColor = [UIColor darkGrayColor]; cell = [[[UITableViewCell alloc] initWithFrame:cellRect reuseIdentifier:TableViewTableCellIdentifier] autorelease]; CGRect keyLabelRect = CGRectMake(0, 5, 5, 20); UILabel *keyLabel = [[UILabel alloc]initWithFrame:keyLabelRect]; keyLabel.tag = 100;......... } else { NSString *currentLanguage = [[NSString alloc] initWithContentsOfFile:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/sprache.txt"]]; static NSString *TableViewTableCellIdentifier = @"TableViewTableCellIdentifier"; UITableViewCell *cell = (UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:TableViewTableCellIdentifier]; CGRect cellRect = CGRectMake(0, 0, 450, 175); cell.backgroundColor = [UIColor darkGrayColor]; cell = [[[UITableViewCell alloc] initWithFrame:cellRect reuseIdentifier:TableViewTableCellIdentifier] autorelease]; CGRect keyLabelRect = CGRectMake(0, 5, 5, 20); UILabel *keyLabel = [[UILabel alloc]..... My problem is, when the table is visible and the orientation is changed, I need to scroll to see the new "layout". How can I manage to "reload" the view after changing the orientation?

    Read the article

  • How to find why NSMutableData is invalid

    - by 4thSpace
    I access a RESTFUL url and get back results. The results are in JSON. I turn the response into a string via: - (void)connectionDidFinishLoading:(NSURLConnection *)connection { NSString *json = [[NSString alloc] initWithBytes:[self.receivedData mutableBytes] length:[self.receivedData length] encoding:NSUTF8StringEncoding]; The json variable has a value of 0x0. When I mouse over it, I see <Invalid CFStringRef. How can I debug this to tell why it is invalid? I render the JSON given back through the browser in A JSON parser. That checks out fine. Results are given back by entering an ID in the URL. Other IDs return results without issue. The result set is fairly large.

    Read the article

  • provisioning profile problem?

    - by senthilmuthu
    hi, i am new to creating provisioning profile.can i use same provisioning profile for all applications(except using *, we can install one app at a time)?for example if i go bundle identifier and give my comapanyname only as com.mycompanyname(apple id).${PRODUCT_NAME:identifier},and also i set my certifate,after that will my application run in device?(without creating provisioning file for each application),i have seen like this in my friend system,how is it possible?any help please?

    Read the article

  • How can I prevent a view from covering my tab controller in my tab based application?

    - by helloJello
    I have an application with a Tab Bar Controller that has three tabs. In tab 1 there is a view (view1) with a button that when clicked transitions the user to a new view (view2) still within tab 1. However when this new view (view2) is loaded it covers my tab bar controller. What is the best approach for me to take to still display tab bar controller as well as keep tab 1 highlighted?

    Read the article

  • Weird landscape UITabBarController Application startup

    - by Stefano Verna
    Hi there. My application is quite simple, but I have some problems when it starts. I setted in the Info.plist to be landscaped, but it seems to ignore the order. In fact, when the app is loading the Simulator is landscaped, but then it returns in portrait mode. This is the hierarchy of the views and controllers: MainViewController (extends UITabBarController just to override shouldAutorotateToInterfaceOrientation:) Three extended UITableViewControllers as tabs (also those have the shouldAutorotateToInterfaceOrientation correctly setted up). If I kinda force the orientation of the device to Landscape with: [[UIDevice currentDevice] setOrientation: UIInterfaceOrientationLandscapeRight]; Then for an instant the Simulator flashes in portrait mode, and then it goes landscaped. The problem is that in this way, the auto-rotation animations gets started, which is something I cannot tollerate. I just want a fixed, landscaped application. Any clues? Am I missing something?

    Read the article

  • Error message when trying to insert method into touchesBegan

    - by Rob
    I am trying to create a new method within my TapDetectingImageView file and it's giving me a warning that it cannot find the method even though I have it declared in the .h file. The specific three warnings all point to the @end line in the .m file when I build it and they say: "Incomplete implementation of class 'TapDetectingImageView' ; 'Method definition for '-functionA:' not found" ; "Method definition for '-functionB:' not found" What am I missing? Am I not allowed to do this in a protocol file like TapDetectingImageView? In my .h file is: @interface TapDetectingImageView : UIImageView <AVAudioPlayerDelegate> { id <TapDetectingImageViewDelegate> delegate; } @property (nonatomic, assign) id <TapDetectingImageViewDelegate> delegate; -(void) functionA:(NSString*)aVariable; -(void) functionB:(NSString*)aVariable; @end In my .m file is: -(void)functionA:(NSString*)aVariable { // do stuff in this function with aVariable } -(void)functionB:(NSString*)aVariable { // do stuff in this function with aVariable }

    Read the article

  • How to cancel a touch sequence

    - by Alex
    I have an UIImage view that responds to touch events. I want to cancel the touch sequence if the touch goes outside of certain bounds. How can I do that? I know that I can inspect the coordinates of the touch object, what I don't know is how to cancel the sequence. I don't see any event in the API that allows for that.

    Read the article

  • Faking a UITableView selection

    - by John Smith
    I have a UITableView where a selection displays some cool stuff in another part of the display. I tried to fake a keypress by writing: NSIndexPath *ip = [NSIndexPath indexPathForRow: 1 inSection:0]; [tableView selectRowAtIndexPath:ip animated:NO scrollPosition:UITableViewScrollPositionTop ]; [self tableView:tableView didSelectRowAtIndexPath:ip]; However it seems the last line is not being run. How can I make it run?

    Read the article

  • "out of scope" error when iterating an NSMutableArray

    - by wgpubs
    Why am I getting an "out of scope" error whenever I try to access the "url" variable in this loop? for(NSString *url in self.winnerImageURLs) { [mediaItemString appendFormat:@"{\"type\":\"image\",\"src\":\"%@\",\"href\":\"%@\"},", url, url]; } The class of very item in the "self.winnerImageURLs" NSMutableArray comes back as NSCFString so I'm not sure what the dealio is here. Any ideas on what I'm doing wrong??? Thanks

    Read the article

  • Rapid taps on an OpenGL ES app introducing input delay

    - by Tim R.
    I am starting out writing a 2D game in OpenGL ES, and I have encountered an odd problem: if I rapidly tap the touchscreen, the input starts lagging behind the display. The more times I tap, the more delay it causes between the input and any indication of that input onscreen. It only happens if I intentionally tap very rapidly, but not from tapping and dragging with any number of fingers. What could be causing this? Excessive details follow: Both accelerometer input and taps are delayed by just tapping. The only events I am responding to are touchesBegan (below) in my EAGLView and accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration in my Game object. There doesn't seem to be any upper limit to the amount of delay: I've gotten up to 12 seconds of delay by tapping rapidly with five fingers. I have not seen any drops in framerate (it stays constantly at 60 fps) in the OpenGL ES tool in Instruments or by taking 1/the time between updates. Possibly relevant code: - (void) drawView:(id) sender { [game update:allTouches]; [renderer render:game]; } -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { allTouches = [event allTouches]; } allTouches is a pointer that gets passed to my Game every update, which passes it to each GameObject in their update methods.

    Read the article

  • Localization not working

    - by Krumelur
    I have an application that is supposed to be localized (two languages, english being the default). However, I seem to only get the English versions of all strings, regardless of what the system default language is. I am probably missing something trivial, but I've read several tutorials now without any solution. I added this line to main(), NSLog(@"Current locale is: %@", [[NSLocale currentLocale] localeIdentifier]); and the resulting printout is en_US, while the system was set to use the localized language. I checked the build output, and the app bundle contains the XX.lproj folders as I believe they should (and they are UTF-16, I confirmed this). What am I missing?

    Read the article

  • How to read a .sqlite file from objective C

    - by Futur
    Hi All, We have a .sqlite file ported with the app, and i wanted to decrypt the file(not just the contents, the whole file), the code we have is able to read a .txt file and i also tried reading the file in binary mode. This isn't working, is there a way to read a .sqlite file from the code. kindly help

    Read the article

  • Does iOS 4 Have "Real" Multitasking?

    - by pkulak
    Ever since the first beta came out I've been trying to find out if "real" multitasking is possible. I.E., can you put a program in the background and have it hang on to a network connection indefinitely? I'm thinking about IM or IRC apps, for example. I've compiled an app myself on OS 4, and without changing a thing it appeared to stay running in the background, but for all I know it was just suspended to memory. The docs say the best you can do is request up to 10 minutes, but in the developer presentation they showed off Skype sitting in the background and then notifying the user that a call was coming in. Does anyone know for sure how this is all going to work?

    Read the article

  • Cell Dequeue problem when table inside another table's cell content view

    - by Shailesh Kanzariya
    I am using two table views (Main Table and Sub Table), one table inside other's cell. I am adding Sub Table in Main Table's cell content view. I am also using different Cell Identifier for both table cells. Now, issue is : When - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath is called, very first time cell of Main Table is generated and when I scroll up/down they all are just dequeued, so it is expected and standard behavior and working fine. But, cell of Sub Table is getting created/allocated every time. It is not dequeued as it should be. I guess, its happening because Sub Table is part of Main Table's Cell Content view. But not sure and don't know how to resolve it. Can somebody help me to find the solution?

    Read the article

  • How to make AVAudioPlayer play once it is stopped?

    - by Viral
    hi friends, I am using AVAudioplayer to play some sound. But once I make it stop using [player stop](where player is the object of AVAudioplayer] It is not starting again to play after some time when I call method [player play], So can any one tell me how to do the same in my application?? The play will again call using NSTimer method, after some delay of time. Thanks in advance...

    Read the article

  • difference among NSthread and NStimer and NSNotifcation?

    - by senthilmuthu
    What is the difference among following codes 1) [NSThread detachNewThreadSelector:@selector(myFunction) toTarget:self withObject:thename]; 2) [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(myFunction:) userInfo:nil repeats:NO]; 3) [self performSelector:@selector(myFunction) withObject:nil afterDelay:myDelay]; 4) [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myFunction:) name:thename object:nil];

    Read the article

  • Problem with sqlite query when using the wrapper

    - by user285096
    - (IBAction)EnterButtonPressed:(id)sender { Sqlite *sqlite = [[Sqlite alloc] init]; NSArray *paths =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *writableDBPath = [documentsDirectory stringByAppendingPathComponent:@"test.sqlite"]; if (![sqlite open:writableDBPath]) return; NSArray *query = [sqlite executeQuery:@"SELECT AccessCode FROM UserAccess"]; NSLog(@"%@",query); I am getting the output as : { ( AccessCode=abcd; ) } Where as in I want it as : abcd I am using the wrapper from : http://th30z.netsons.org/2008/11/objective-c-sqlite-wrapper/ Please help .

    Read the article

  • Pushing View from UITableView Problem

    - by golfromeo
    Basically, what I want is to be able to press a record in a table, and have it push to another view. To do this, I created a nib file and a UIViewController subclass (for the "pushed" view). I set the nib file's "File Owner" to be the controller I created. Then, in the view controller of the table that will push that view, I set the didSelectRowIndexAtPath: method to include the following: SearchTableController *vc = [[SearchTableController alloc] initWithNibName:@"SearchTable" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:vc animated:YES]; [vc release]; (where "SearchTableController" is the name of the UIViewController subclass and "SearchTable" is the name of the nib file) However, when I run this code and click on the record, nothing happens- the app doesn't crash, but the view doesn't get pushed. The code is getting run, because it works when I NSLog(), but it doesn't seem to be pushing the view. Thanks for any help in advance.

    Read the article

  • Other class view cannot be loaded into TabBar Controller

    - by SkyEagle888
    Hi, I am making a project with 3 child views that are switched by a TabBar. What I did Create a project (Window-Based) Add 3 child classes (Window-Based too) Add a Tab Bar Controller to MainWindow.xib For each view under Tab Bar Controller, the 'Class', 'Name', 'Title' and 'NIB Name' are all set to connect to the corresponding class Add @class, IBOutlet are done in AppDelegate.h and AppDelegate.m In didFinishLaunchingWithOptions, I called [window addSubView: tabBarController.view]; Save and Run -- Tab Bar with 3 items can be seen But ... the 3 child views ARE NOT LOADED and SHOWN ... :( Anything that I missed ? Million Thanks

    Read the article

< Previous Page | 152 153 154 155 156 157 158 159 160 161 162 163  | Next Page >