Search Results

Search found 8409 results on 337 pages for 'itunes sdk'.

Page 167/337 | < Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >

  • [iPhone] How to order an array

    - by Fabrizio
    Hi all, I got an array in my app and I need to order by one of its key. Basically what the app does is taking latitude and longitude somewhere, calculate the distance from my actual position and create an array containing a key called "distance". I'm using myArray sortUsingDescriptors: [NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"distance" ascending:YES] autorelease]]]; I'm not sure it's working, I mean the first results are ordered but then it shows distance closer to the previous, as example: 0.8 km 1.6 km 1.9 km 10053.9 km 1098.0 km 2372.0 km 470.5 km Any suggestion? I thank you in advance for any kind of help. Fabrizio

    Read the article

  • how can i write a Broadcast Receiver that will be invoked when user clicks on any application icon.

    - by chinnuthelearner
    hai every one, i have a query. how can i write a Broadcast Receiver that will be invoked when user clicks on any application icon. i tried by writing but it is not called. i tried, by using Packagemanager i will get ApplicationInfo from that i can know all the application starting activity name and package names. i thought i can use them to registerReceiver and my receiver will listen by its launching activity and package name. but i strucked.. i am unable to do that.. i think i lost the way.. please guide me...

    Read the article

  • Chinese records of sqlite databse are in not accessable in iphone app

    - by Mas
    Hi! I'm creating an iphone app. In which I'm reading data from the sqlite db and presenting it in the tableview control. Problem is that the data is in chinese language. Due to unknown reason, when I read/fetch record from the sqlite table, some records are presented and other are missed by objc. Even objc reads some columns of the missing values, But returns the nil results of the some columns. In reality these columns are not empty. I tried many solutions but didn't find any suitable. Same database is working perfectly in the android version of the app. Any one can help here is the code of reading the chinese records from table Quote *q = [[Quote alloc] init]; q.catId = sqlite3_column_int(statement, 0); q.subCatId = sqlite3_column_int(statement, 1); q.quote = [NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, 2)]; and here is the some records which iphone misses ??????·??? ??????,????????! ??????,??????? Thanks

    Read the article

  • How to detect when UITextField become empty

    - by Jakub
    Hello, I would like to perform a certain action when UITextField becomes empty (user deletes everything one sign after another or uses the clear option). I thought about using two methods - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string; and - (BOOL)textFieldShouldClear:(UITextField *)textField; from UITextFieldDelegate I'm not sure how to detect the situation when the text field becomes empty? I tried with: if ([textField.text length] == 0) but it does't work as the fisrt of the above methods is called before the sign is deleted from the text field. Any ideas?

    Read the article

  • Android hidden title bar comes back

    - by kasplurpo
    When my app starts, the title bar is hidden. However, if I leave the app and then return (minimize or phone goes to sleep), there is a blank bar inserted at the top. Is this an intentional feature? How can I prevent it? It seems that the bar goes away after I press the menu key. This is the relevant line in the manifest file: android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" Thanks

    Read the article

  • Most efficient way to download media files from a server from within an iPhone app.

    - by nikki
    Hi, I have an iPhone application which contains a lot of media files, so far we have been able to keep the size of the iPhone app to less than 20 MB. We add new content with new updates, it would be difficult to keep the app size within the 20 MB limit. The right thing to do here would be to fetch the files on demand from a media/web server. If you have any pointers on how to go about doing this, please suggest. What we would need is to fetch the media files (.jpg/.png images ) on demand when the user taps on a small thumbnail for the image. Are there existing frameworks/servers that provide such services to iPhone clients. Thanks.

    Read the article

  • iPhone stretchableImageWithLeftCapWidth only makes "D"s.

    - by Jill
    UIImage *aImage = [[UIImage imageNamed:@"Gray_Button.png"] stretchableImageWithLeftCapWidth:25 topCapHeight:0]; Trying to make a "glass pill button". What does "stretch" do if the image is bigger... and the button I'm trying to use it on... is smaller? Does the image 'stretch' and 'shrink'? The reason I ask... is because all my images end up look like a "D" shape. The left side is squared-off... and the right side is rounded. What would a D-shape tell you that I'm doing wrong? Too much.. or too little... "leftCap setting"? Too large an image?

    Read the article

  • NSSortDescriptor for NSFetchRequestController causes crash when value of sorted attribute is changed

    - by AJ
    I have an Core Data Entity with a number of attributes, which include amount(float), categoryTotal(float) and category(string) The initial ViewController uses a FethchedResultsController to retrieve the entities, and sorts them based on the category and then the categoryTotal. No problems so far. NSManagedObjectContext *moc = [self managedObjectContext]; NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"Transaction" inManagedObjectContext:moc]; NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease]; [request setEntity:entityDescription]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(dateStamp >= %@) AND (dateStamp =< %@)", startDate, endDate]; [request setPredicate:predicate]; NSSortDescriptor *sortByCategory = [[NSSortDescriptor alloc] initWithKey:@"category" ascending:sortOrder]; NSSortDescriptor *sortByTotals = [[NSSortDescriptor alloc] initWithKey:@"categoryTotal" ascending:sortOrder]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortByTotals, sortByCategory, nil]; [request setSortDescriptors:sortDescriptors]; NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:request managedObjectContext:managedObjectContext sectionNameKeyPath:@"category" cacheName:nil]; aFetchedResultsController.delegate = self; self.fetchedResultsController = aFetchedResultsController; On selecting a row (tableView:didSelectRowAtIndexPath), another view controller is loaded that allows editing of the amount field for the selected entity. Before returning to the first view, categoryTotal is updated by the new ‘amount’. The problem comes when returning to the first view controller, the app bombs with *Serious application error. Exception was caught during Core Data change processing: Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (1) must be equal to the number of rows contained in that section before the update (1), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted). with userInfo (null) Program received signal: “EXC_BAD_ACCESS”.* This seems to be courtesy of NSSortDescriptor *sortByTotals = [[NSSortDescriptor alloc] initWithKey:@"categoryTotal" ascending:sortOrder]; If I remove this everything works as expected, but obviously without the sorting I want. I'm guessing this is to do with the sorting order changing due to categoryTotal changing (deletion / insertion) but can't find away fix this. I've verified that values are being modified correctly in the second view, so it appears down to the fetchedResultsController being confused. If the categoryAmount is changed to one that does not change the sort order, then no error is generated I'm not physically changing (ie deleting) the number of items the fetchedResultsController is returning ... the only other issue I can find that seem to generate this error Any ideas would be most welcome Thanks, AJ

    Read the article

  • Back button of Navigation Controller does not work!

    - by JosephH
    For some reason, if I try to go back to the main menu using the back button on the upper left corner, only the title returns to the previous menu, but not the view controller. View controller would return to the previous menu only if I explicitly call popViewControllerAnimated using some other button. Is there anyway to solve this? I think I've coded something wrong. Tried googling but couldn't find any cases like mine.

    Read the article

  • iphone os 4.0 and libxml2 and os 2.2.1

    - by g.revolution
    Hi, My project using libxml2. and i want to compile my application with OS 4.0 with deployment target 2.2.1 but i m getting errors for libxml2. what is the way to do this. i want compile on OS4.0 and deployment target to 2.2.1 with libxml2 support. Looking for answers. thanks in Advance

    Read the article

  • How to set image on EAGL VIEW

    - by Viral
    hi, I want to put images from my photo library in to the EAGL view for some further processing. The image that are already in our resources folder will be taken by itself but mltiple or images from photo library can't. So any one knows how to put image on EAGL view in open GLES. Regtards viral

    Read the article

  • Why am I getting this warning about my app delegate and CLLocationManageDelegate?

    - by Dan Ray
    Observe this perfectly simple UIViewController subclass method: -(IBAction)launchSearch { OffersSearchController *search = [[OffersSearchController alloc] initWithNibName:@"OffersSearchView" bundle:nil]; EverWondrAppDelegate *del = [UIApplication sharedApplication].delegate; [del.navigationController pushViewController:search animated:YES]; [search release]; } On the line where I get *del, I am getting a compiler warning that reads, Type 'id <UIApplicationDelegate>' does not conform to the 'CLLocationManagerDelegate' protocol. In fact, my app delegate DOES conform to that protocol, AND what I'm doing here has nothing at all to do with that. So what's up with that message? Secondary question: sometimes I can get to my navigationController via self.navigationController, and sometimes I can't, and have to go to my app delegate's property to get it like I'm doing here. Any hint about why that is would be very useful.

    Read the article

  • No Debug information of an iPhone app

    - by Markus Pilman
    Hi all, I wrote an iPhone app which uses a third party library. I crosscompiled this library successfully and everything works smoothly. But when I want to debug the application, it would make sense to also be able to debug the library. So I compiled also the external library with debuging information (usign the gcc option -ggdb). But when I want to debug it, I get the correct symbol names, but the positions are always wrong/extremly wierd (locale_facets.tcc:2505 or iostream:76). For example a stack trace could look like this: #0 0x000045e8 in zorba::serialization::SerializeBaseClass::SerializeBaseClass () at iostream:76 #1 0x0001d990 in zorba::RCObject::RCObject () at iostream:76 #2 0x00025187 in zorba::xqpStringStore::xqpStringStore () at iostream:76 #3 0x000719e4 in zorba::String::String () at locale_facets.tcc:2505 #4 0x00030513 in iphone::iLabelModule::getURI (this=0x533f710) at /Users/sausalito/eth/izorba/sandbox/ilabel.cpp:19 #5 0x00356766 in zorba::static_context::bind_external_module () at locale_facets.tcc:2505 #6 0x0006139d in zorba::StaticContextImpl::registerModule () at locale_facets.tcc:2505 #7 0x000333e5 in -[ZorbaCaller init] (self=0x53405c0, _cmd=0x95583398) at /Users/sausalito/eth/izorba/sandbox/ZorbaCaller.mm:61 #8 0x00033180 in +[ZorbaCaller instance] (self=0x11dc2bc, _cmd=0x93679591) at /Users/sausalito/eth/izorba/sandbox/ZorbaCaller.mm:37 #9 0x0003d998 in -[testOne execute:] (self=0x530d560, _cmd=0x9366b126, sender=0x5121da0) at /Users/sausalito/eth/izorba/sandbox/generator/testOne.mm:13 #10 0x01a21405 in -[UIApplication sendAction:to:from:forEvent:] () #11 0x01a84b4e in -[UIControl sendAction:to:forEvent:] () #12 0x01a86d6f in -[UIControl(Internal) _sendActionsForEvents:withEvent:] () #13 0x01a85abb in -[UIControl touchesEnded:withEvent:] () #14 0x01a3addf in -[UIWindow _sendTouchesForEvent:] () #15 0x01a247c8 in -[UIApplication sendEvent:] () #16 0x01a2b061 in _UIApplicationHandleEvent () #17 0x03b6fd59 in PurpleEventCallback () #18 0x034a8b80 in CFRunLoopRunSpecific () #19 0x034a7c48 in CFRunLoopRunInMode () #20 0x03b6e615 in GSEventRunModal () #21 0x03b6e6da in GSEventRun () #22 0x01a2bfaf in UIApplicationMain () #23 0x0002dd7e in main (argc=1, argv=0xbffff044) at /Users/sausalito/eth/izorba/sandbox/main.m:16 Does anybody have an idea, where these wrong locations come from?

    Read the article

  • Animate cell within a table

    - by amok
    That's what I have: - A table with a few rows, one column only What I am trying to accomplish: Double tap on any row should produce an animation of the cell. The animation that I want is a flip vertically of the row. I am displaying some data in each row and what I want to do is displaying the source of the data "on the back" of the row, so to speak. Is it possible? If yes, how?

    Read the article

  • Save previous context

    - by Ann
    I use CALayers and I`ve override this delegate -(void)drawLayer:(CALayer*)layer inContext:(CGContextRef)context { //draw some rectangle depends on some custom parameters } Then I want to add to this layer another rectangle. And when I call [layer setNeedsDisplay] I expect to see 2 different rectangles in layer but I see only last added rectangle. So please advice me how can I do what I want. Thank you in advance.

    Read the article

  • Need tutorials on Content providers in android

    - by Rahul Varma
    Hi folks, I am in desperate need of good tutorials on Content Providers in Android. I have been searching in the web for the tutorials but none could give me a clear idea on how content providers work. I'll be grateful if anyone can provide me with sample codes of the projects that implement content providers...

    Read the article

  • drawRect is not refreshing the screen

    - by coure06
    I have this code in my drawRect method float aValue = .0167f; float fValue = 20; for(int i=1; i<=6; i++) { CGContextSelectFont(context, "Arial", fValue, kCGEncodingMacRoman); CGContextSetCharacterSpacing(context, 0); CGContextSetTextDrawingMode(context, kCGTextFill); NSString *hString = [[NSString alloc] initWithFormat:@"%i",i]; CGContextSetRGBFillColor(context, 1, 1, 1, aValue); CGContextShowTextAtPoint(context, i*25, i*16, [hString UTF8String], [hString length]); aValue += 0.167; fValue += 1; } I am calling a method using NSTimer like this staticTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(refreshUIView) userInfo:nil repeats:YES]; here is the refreshUIView -(void)refreshUIView { [self setNeedsDisplay]; } Problem is that drawRect is not clearing the screen, its just over writing what have been written last time on screen.

    Read the article

  • How to rotate a UIImageView?

    - by jkally
    It's quite frustrating not to be able to do such a simple task: I have an "app" with a single viewcontroller, and in it a single UIImageView, that's initialized to a specific image at potrtait mode. Now when the iPhone gets roteated to landscape mode and the shouldAutorotateToInterfaceOrientation event fires, at which I return YES, my resulting UIImageView looks totally screwed up: either the image is stretched so to fill landscape mode frame (which looks ridiculuous of course) or the top and bottom of the image are cropped. How can I have my UIImageview and the contained image handle the device rotation gracefully, and display normal looking image at landscape mode as well?

    Read the article

  • Two Problems I'm having with UIButton and UIView.

    - by Andy
    Hi all, I haven't been programming on the iPhone for very long, but I'm picking it up slowly by googling problems I get. Unfortunately I haven't been able to find an answer for these. I have started a new View-based application in Xcode 3.2.2 and immediately added the following files: myUIView.m and myUIView.h, which are subclasses of UIView. In Interface Builder, I set the subclass of the default UIView to be myUIView. I made a button in the drawRect method. Problem one: The title of the button only appears AFTER I click the screen, why? Problem two: I want the button to produce the modalview - is this possible? The code is as follow: #import "myUIView.h" @implementation myUIView - (void)drawRect:(CGRect)rect { // Drawing code button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; button.frame = CGRectMake(0,0,100,100); [button setTitle:@"butty" forState:UIControlStateNormal]; [button addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:button]; } -(void)buttonPressed:(id)sender{ NSLog(@"Button pressed"); //present modal view somehow..? } I can't see how to post attachments, but if anyone thinks it will help I can upload the source. Many thanks, Andy

    Read the article

  • Big problems on iPhone ad hoc build -

    - by phil swenson
    No matter what I do I can't get my ad hoc provisioning profile to work. In Organizer, I always get "A valid signing identity matching this profile cannot be found in your keychain" for my adhoc profile. I have my distribution cert installed in my login keychain. I dragged the adhoc mobileprovision file to XCode... that's pretty much all there is to it, right? I searched around and found suggestions like re-creating the cert/profile. Did that, same thing. Also make sure your login keychain is default. It is. Even tried a different computer. Same result. In XCode AdHoc target I don't have a distribution target to pick. This all used to work, but obviously I messed something up..... Perhaps my process is just wrong (it's been months since I did this). Does someone have a step by step list of how to set up for adhoc distribution?

    Read the article

  • Possibility of a custom Contacts field with a set list of values and Contacts lookup performance

    - by areyling
    I'm pretty sure it's not viable to do what I'd like to based on some initial research, but I figured it couldn't hurt to ask the community of experts here in case someone knows a way. I'd like to create a custom field for contacts that the user is able to edit from the main Contacts app; however, the user should only be allowed to select from a list of four specific values. A short list of string values would be ideal, but an int with a min/max range would suffice. I'm interested in knowing if it's possible either way, but also wondering if it make sense to go this route performance wise. More specifically, would it be better to look up a contact (based on a phone number) each time a call or SMS message is received or better to store my own set of data (consisting of name, numbers, and the custom field) and just syncing contact info in a thread every so often? Or syncing contacts the first time the app is run and then registering for changes using ContentObserver? Here is a similar question with an answer that explains how to add a custom field to a contact. Thanks in advance.

    Read the article

< Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >