Search Results

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

Page 162/337 | < Previous Page | 158 159 160 161 162 163 164 165 166 167 168 169  | Next Page >

  • How much difference you find between scrollview offset and contentview offset of table?

    - by neha
    Hi all, In my application, I want to detect the end of the entire table with scrollview. Since there're no sections in my scrollview, I'm using noOfRows*rowHeight to reach the end. I'm using scrollview.contentOffset.y to detect the y offset, but this contentOffset isn't matching the multiplication result i.e. I have 20 rows and with height as 250. So it comes as 5000, but my scrollview.offset.y at the end of last cell is nearly about 4650. What's this difference? Thanx in advance.

    Read the article

  • sqlite3 crashes for second insert statement

    - by Ayaz Alavi
    My App is crashing on statement (sqlite3_step(insertAlert) == SQLITE_DONE) when executed for i = 1. Can anybody tell me why it is crashing? sqlite3_stmt *insertAlert; textmeAppDelegate *textme = (textmeAppDelegate *)[[UIApplication sharedApplication] delegate]; NSString *insert = @"INSERT INTO alerts (alert_id, email_address, messege_text, when_to_send, how_often_send, recipient_phone_number) VALUES(?, ?, ?, ?, ?, ?)"; if(sqlite3_prepare_v2(textme.dbConn, [insert UTF8String], -1, &insertAlert, NULL) == SQLITE_OK) { NSDictionary *tmpDictionary; NSString *alertId; for(int i=0; i<[keys count]; i++) { alertId = [NSString stringWithFormat:@"%@", [keys objectAtIndex:i]]; tmpDictionary = [NSDictionary dictionaryWithDictionary:[dictionary2 objectForKey:alertId]]; sqlite3_bind_text(insertAlert, 1, [NSString stringWithFormat:@"%@", [tmpDictionary objectForKey:@"alert_id"]], -1, SQLITE_TRANSIENT); sqlite3_bind_text(insertAlert, 2, [NSString stringWithFormat:@"%@", [tmpDictionary objectForKey:@"email_address"]], -1, SQLITE_TRANSIENT); sqlite3_bind_text(insertAlert, 3, [NSString stringWithFormat:@"%@", [tmpDictionary objectForKey:@"messege_text"]], -1, SQLITE_TRANSIENT); sqlite3_bind_text(insertAlert, 4, [NSString stringWithFormat:@"%@", [tmpDictionary objectForKey:@"when_to_send"]], -1, SQLITE_TRANSIENT); sqlite3_bind_text(insertAlert, 5, [NSString stringWithFormat:@"%@", [tmpDictionary objectForKey:@"how_often_send"]], -1, SQLITE_TRANSIENT); sqlite3_bind_text(insertAlert, 6, [NSString stringWithFormat:@"%@", [tmpDictionary objectForKey:@"recipient_phone_number"]], -1, SQLITE_TRANSIENT); if (sqlite3_step(insertAlert) == SQLITE_DONE) { sqlite3_finalize(insertAlert); sqlite3_clear_bindings(insertAlert); } else { NSAssert1(0, @"Error while creating add statement. '%s'", sqlite3_errmsg(textme.dbConn)); //[textme showError:@"Device Error" errMsg:sqlite3_errmsg(textme.dbConn)]; return FALSE; } } sqlite3_finalize(insertAlert); }

    Read the article

  • Showing value of UISlider inside App Prefs?

    - by Garrett H
    I have a settings bundle, working perfectly, that I would like to customize a bit. I have, among other things, a PSSliderSpecifier and a PSTitleValueSpecifier. What I would like to do is change the value of the PSTitleValueSpecifier to show the current value of the slider, preferably updating every time the slider's value changes (Actually, what I'd like even more would be displaying the slider's value on the same row as the slider). I know the settings bundle is rather strict about what you're allowed to do in it, but is there any way of doing this?

    Read the article

  • How can I render an in-memory UIViewController's view Landscape?

    - by Aaron
    I'm trying to render an in-memory (but not in hierarchy, yet) UIViewController's view into an in-memory image buffer so I can do some interesting transition animations. However, when I render the UIViewController's view into that buffer, it is always rendering as though the controller is in Portrait orientation, no matter the orientation of the rest of the app. How do I clue this controller in? My code in RootViewController looks like this: MyUIViewController* controller = [[MyUIViewController alloc] init]; int width = self.view.frame.size.width; int height = self.view.frame.size.height; int bitmapBytesPerRow = width * 4; unsigned char *offscreenData = calloc(bitmapBytesPerRow * height, sizeof(unsigned char)); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef offscreenContext = CGBitmapContextCreate(offscreenData, width, height, 8, bitmapBytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast); CGContextTranslateCTM(offscreenContext, 0.0f, height); CGContextScaleCTM(offscreenContext, 1.0f, -1.0f); [(CALayer*)[controller.view layer] renderInContext:offscreenContext]; At that point, the offscreen memory buffers contents are portrait-oriented, even when the window is in landscape orientation. Ideas?

    Read the article

  • performSelector:withObject:afterDelay: not working from scrollViewDidZoom

    - by oldbeamer
    Hi all, I feel like I should know this but I've been stumped for hours now and I've run out of ideas. The theory is simple, the user manipulates the zoom and positioning in a scrollview using a pinch. If they hold that pinch for a short period of time then the scrollview records the zoom level and content offsets. So I thought I'd start a performSelector:withObject:withDelay on the scrollViewDidZoom delegate method. If it expires then I record the settings. I delete the scheduled call every time scrollViewDidZoom is called and when the pinch gesture finishes. This is what I have: - (void)scrollViewDidZoom:(UIScrollView *)scrollView{ NSLog(@"resetting timer"); [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(positionLock) object:nil]; [self performSelector:@selector(positionLock) withObject:nil afterDelay:0.4]; } -(void)positionLock{ NSLog(@"position locked "); } - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale{ NSLog(@"deleting timer"); [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(positionLock) object:nil]; } This is the output: 2010-05-19 22:43:01.931 resetting timer 2010-05-19 22:43:01.964 resetting timer 2010-05-19 22:43:02.231 resetting timer 2010-05-19 22:43:02.253 resetting timer 2010-05-19 22:43:02.269 resetting timer 2010-05-19 22:43:02.298 resetting timer 2010-05-19 22:43:05.399 deleting timer As you can see the delay between the last and second last events should have been more than enough for the delayed selector call to execute. If I replace performSelector:withObject:withDelay with plain old performSelector: I get this: 2010-05-19 23:08:30.333 resetting timer 2010-05-19 23:08:30.333 position locked 2010-05-19 23:08:30.366 resetting timer 2010-05-19 23:08:30.367 position locked 2010-05-19 23:08:30.688 deleting timer Which isn't what I want but serves to show that it's only the delay that's causing it to not function, not something to do with the selector not being declared in the header, being misspelt or any other reason. Any ideas as to why it's not working?

    Read the article

  • How to get call notification using mobile substrate on iphone?

    - by prathumca
    Hi all, I want to use mobile substrate to "hook" some code into IPhone's "MobileCal" app so that the injected code will send a notification to my app MobileCal gets a call notification. But I'm out of luck and no clue which method need to be replaced by my "hooking" method in the "MobileCal" app. For example, the "MobileLog" and "iRealSMS" has the same functionality and they used mobile substrate to hook their code into "MobileCal" app. If any one has any clue, I would definitely appreciate them.

    Read the article

  • AVD properties for Motorola Flipout?

    - by kefs
    I'm looking to create AVDs to test my apps on, and i'm trying to figure out the correct settings for a square screen such as the new Motorola Flip Out. I don't see a wikipedia article for it, or many specs... On a related note, what about tablets? Actually.. Why aren't there a set of AVD instances with params from popular devices.. or at least a site that lists them for each of the 60+ devices. Thanks in advance :)

    Read the article

  • iPhone: Add background button to view when UITableView has no cells

    - by Nic Hubbard
    I have a UITableViewController, when there is no data to populate the UITableView, I want to add a button, which uses an image. So, rather than the user seeing a tableview with no records, they will see an image that says, "No records have been added, Tap to add one", then they click and we create a new one. I assumed I would just hide the UITableView, then create the button, but I never see the button. Here I am using: if ([[fetchedResultsController sections] count] == 0) { self.tableView.hidden = YES; // Create button w/ image UIButton * btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(0, 0, 100, 50); [btn setImage:[UIImage imageNamed:@"no-rides.png"] forState:UIControlStateNormal]; [self.view addSubview:btn]; } Ideas on why I would never see the button? When I show this view, it seems to have a transparent background for a second, then changes white...

    Read the article

  • Help - Getting wrong orientation

    - by barbgal
    Hi all, I am having one issue in my application which drives me mad... In my application, i rotate the simulator to the landscape mode but in my below function i get portrait orientation... what is the problem here. Pls help me out -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if ( interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown ) { NSLog(@" portrait orientation"); } else { NSLog(@"Landscape"); } }

    Read the article

  • Programatically get own Phone Number in iPhone OS 4.0

    - by sandy
    I am developing an iPhone application for jail broken phones and in this application I would like to fetch user's phone number. I have gone through the entire stackoverflow.com and found some relevant answers but all of them are obsolete and doesn't work with iOS 4.0 anymore. The most famous solution for this problem is NSString *num = [[NSUserDefaults standardUserDefaults] stringForKey:@"SBFormattedPhoneNumber"]; but as I mentioned this solution no more works with iOS 4.0 As my application is intended towards the jail broken phones and not intended the Apple app store so I am not worried about my app rejection, hence any private API will also work for me. Also please let me know if we can fetch IMSI number from SIM using any private APIs of iPhone

    Read the article

  • Facebook: "URL could not be liked because it has been blocked" error in iOS app

    - by Andrew Madsen
    I'm working on an iOS app that allows the user to like a Facebook page within the app. I've implemented this using FacebookLikeView. During the course of testing this functionality, I've liked and unliked the same page multiple times. Unfortunately, this seems to have triggered Facebook's spam detection. Now, when trying to like a page using the like button displayed by FacebookLikeView, the following error is presented: "URL could not be liked because it has been blocked". Based on reports of the same problem found by searching the web, I've filled out this form to request that Facebook remove the block. However, I've received no response from them. I'm not sure how to proceed. Has anyone else run into this issue and successfully solved it?

    Read the article

  • Start one functon after another finished iphone

    - by user295944
    I have a function that updates the gps coordinate lat and long then sends a tweet with the lat and long info attached. I want the function to wait until the lat and long are filled before the tweet goes through but it seems to do both at the same time so the lat and long don't get filled in. How do I make the gps location update first?

    Read the article

  • Exception when creating an activity: Could not select item Parcel unable to marshal value

    - by user341652
    Hi, I am trying to call an Activity from another instance of the activity. The code is supposed to be a simple file browser (part of a larger application). I am using a ListActivity, and when an item (such as a folder) is selected, it is supposed to open it up in the new Activity. I have a feeling it is a problem with the AndroidManifest (which just has the basic tag). Any assistance would be appreciated. Thanks, Steve

    Read the article

  • How do I reference my MainViewController from another class?

    - by todd412
    Hi, I am building an iPhone Utility app that uses UIImageView to display an animation. Within the MainViewController's viewDidLoad() method, I am creating an instance of a CustomClass, and then setting up the animations: - (void)viewDidLoad { [super viewDidLoad]; cc = [CustomClass new]; NSArray * imageArray = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"image-1-off.jpg"], [UIImage imageNamed:@"image-2-off.jpg"], [UIImage imageNamed:@"image-3-off.jpg"], [UIImage imageNamed:@"image-4-off.jpg"], nil]; offSequence = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; offSequence.animationImages = imageArray; offSequence.animationDuration = .8; offSequence.contentMode = UIViewContentModeBottomLeft; [self.view addSubview:offSequence]; [offSequence startAnimating]; } That works fine. However, I would like to be able to move all the above code that sets up the UIImageView into my CustomClass. The problem is in the second to last line: [self.view addSubview:offSequence]; I basically need to replace 'self' with a reference to the MainControllerView, so I can call addSubview from within my CustomClass. I tried creating an instance var of CustomClass called mvc and a setter method that takes a reference to the MainViewController as an argument as such: - (void) setMainViewController: (MainViewController *) the_mvc { mvc = the_mvc; } And then I called it within MainViewController like so: [cc setMainController:MainViewController:self]; But this yields all sorts of errors which I can post here, but it strikes me that I may be overcomplicating this. Is there an easier way to reference the MainViewController that instanatiated my CustomClass?

    Read the article

  • iPhone - How do I find the MAC address of the connected WiFi access point?

    - by Ciaran
    Without using the private APIs, is it possible to programatically determine the MAC address of the access point that the iPhone is connected to? I understand that this should be doable using the core BSD libraries, but we are new to this, so it would be great if someone can point us to some starter code. Note: we're trying to determine the MAC address of the remote device - not the MAC address of the iPhone.

    Read the article

  • CGContextShowTextAtPoint: invalid context

    - by coure06
    I want to call a method responsible for drawing text on screen after each 5 seconds. Here is my code -(void) handleTimer: (NSTimer *)timer { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2.0); CGContextSetStrokeColorWithColor(context, currentColor.CGColor); CGContextTranslateCTM(context, 145.0, 240.0); CGContextScaleCTM(context, 1.0, -1.0); CGContextSelectFont(context, "Arial", 18, kCGEncodingMacRoman); CGContextSetCharacterSpacing(context, 1); CGContextSetTextDrawingMode(context, kCGTextFillStroke); CGContextSetRGBStrokeColor(context, 0.5,0.5,1,1); CGContextShowTextAtPoint(context, 100, 100, "01", 2); } But after 5 seconds when this method is called i am getting this error CGContextShowTextAtPoint: invalid context Another thing is how to show a thinner font?

    Read the article

  • how to send a POST value to a server with a PHP script waiting for it from iPhone app

    - by Sam Jarman
    Hi In my iPhone app - I am trying to get what the user types in a box emailed to me. I am going to use a PHP script sitting on my server, and try send the data to it for it to be processed. Promblem is... how do i do this? Im using the ASIHTTPRequest wrapper and have some code like this ASIFormDataRequest *request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease]; [request setPostValue:@"[email protected]" forKey:@"address"]; [request setPostValue:@"mymessagehere" forKey:@"message"]; and have this simple php script which i plan to use here http://www.w3schools.com/PHP/php_mail.asp How do I go about joining these up? Any tutorial links/blog post/ideas appreciated

    Read the article

  • UIScrollView Does not Scroll

    - by paul simmons
    I have added a long info screen to my iPhone app. The info is a long UIImageView, and it is contained inside a UIScrollView. They are both defined in .xib file. At run-time, initially I set scrollview's position outside window, and when user clicks a button, set its position inside window. This part is OK. But scrollview displays the image but does not scroll. Isn't it enough to place in MainViewContoller.xib, set the contained content, and (at code) set its contentSize equal to the content's size? BTW: I try it at simulator currently.

    Read the article

  • File observer problem

    - by Nemat
    Hi, I want to listen to the changes occured in file system.I am using FileObserver.Here is my code: Code: class MyDirObserver extends FileObserver { String superPath; public MyDirObserver(String path) { super(path, ALL_EVENTS); this.superPath=path; } public void onEvent(int event, String path) { Log.e("onEvent of Directory", "=== onEvent ==="); try{ _Dump("dir", event, path,superPath); } catch(NullPointerException ex) { Log.e("ERROR","I am getting error"); } } } private void _Dump(final String tag, int event, String path,String superPath) { Log.d(tag, "=== dump begin ==="); Log.d(tag, "path=" + path); Log.d(tag,"super path="+superPath); Log.d(tag, "event list:"); if ((event & FileObserver.OPEN) != 0) { Log.d(tag, " OPEN"); } if ((event & FileObserver.CLOSE_NOWRITE) != 0) { Log.d(tag, " CLOSE_NOWRITE"); } if ((event & FileObserver.CLOSE_WRITE) != 0) { Log.d(tag, " CLOSE_WRITE"); Log.i("NEWFILEOBSERVER","File is Modified"); if(path!=null) { Log.d("---------FilePath",superPath+path); } } if ((event & FileObserver.CREATE) != 0) { isCreate=true; Log.i("NEWFILEOBSERVER","File is Created "); if(path!=null) { Log.d("---------FilePath",superPath+path); } Log.d(tag, " CREATE"); } if ((event & FileObserver.DELETE) != 0) { Log.i("NEWFILEOBSERVER","File is deleted"); if(path!=null) { Log.d("---------FilePath",superPath+path); } // startMyActivity("A new file is deleted thats="+superPath); Log.d(tag, " DELETE"); } if ((event & FileObserver.DELETE_SELF) != 0) { Log.d(tag, " DELETE_SELF"); } if ((event & FileObserver.ACCESS) != 0) { Log.d(tag, " ACCESS"); } if ((event & FileObserver.MODIFY) != 0) { if(!isModified) isModified=true; if(isModified && isOpen) isAgainModified=true; Log.d(tag, " MODIFY"); } if ((event & FileObserver.MOVED_FROM) != 0) { Log.d(tag, " MOVED_FROM"); if(path!=null) { Log.d("---------FilePath",superPath+path); } } if ((event & FileObserver.MOVED_TO) != 0) { Log.d(tag, " MOVED_TO"); if(path!=null) { Log.d("---------FilePath",superPath+path); } } if ((event & FileObserver.MOVE_SELF) != 0) { Log.d(tag, " MOVE_SELF"); } if ((event & FileObserver.ATTRIB) != 0) { Log.d(tag, " ATTRIB"); } Log.d(tag, "=== dump end ==="); } it stops after some time.I dont get the exact time but doesnt work always though I call startWatching() in service in a loop which runs for all the folders of sdcard and calls startWatching() for each of them. It shows unpredictable behaviour and stops listening for some folders and runs perfectly for the others. I hope you guys help me.I tried many ways but it doesnt work perfectly.Am I doing something wrong??? or there we have some other way to do this....... Please help me........I have to get this done withing few days...... Any help is appreciated!!!! Thanks in Advance Nemat

    Read the article

< Previous Page | 158 159 160 161 162 163 164 165 166 167 168 169  | Next Page >