Search Results

Search found 16516 results on 661 pages for 'facebook sdk 3 14 x'.

Page 199/661 | < Previous Page | 195 196 197 198 199 200 201 202 203 204 205 206  | Next Page >

  • View the Task's activity stack

    - by Mic
    Hi There, I just started developing a simple Android application while I'm still learning its platform. I'm using Eclipse IDE with the ADT plugin 0.9.6 and I need to know if it's possible to view the activity stack that is associated with a Task. Is there any way through the DDMS tool or through any other technique? Thanks in advance for your help/advice. Mic

    Read the article

  • Custom TableViewCell with TextField and first responder

    - by Robb
    I have a custom TableView cell that contains a TextField and I want it to become the first responder as soon as the view is shown but [textcell.textfield becomeFirstResponder] does not work. I know it's because it's a custom cell in another class and I even tried it there and it didn't work. Anyone know how to pull this off? Thanks...

    Read the article

  • iPhone: Remove annotation from MKMapView which is in another view

    - by Nic Hubbard
    I have two views. The first is a MKMapView with some annotations. Clicking a UIButton pushes a second view on the stack. This has a UITableView with a list of annotations which correspond to the map annotations. So, when you click the delete button, how can I call my MKMapView which is in another view, so that I can remove the annotation. My MKMapView is declared in my app delegate, as well as my current class. I am trying to use the following, but it is not working: RideAppDelegate *appDelegate = (RideAppDelegate *)[[UIApplication sharedApplication] delegate]; Annotation *ano; CLLocationCoordinate2D anoPoint; anoPoint.latitude = [[eventToDelete valueForKey:@"latitude"] doubleValue]; anoPoint.longitude = [[eventToDelete valueForKey:@"longitude"] doubleValue]; ano = [[[Annotation alloc] init] autorelease]; ano.coordinate = anoPoint; [appDelegate.ridesMap removeAnnotation: ano]; [appDelegate release]; I must be trying to access the MKMapView of my other view incorrectly?

    Read the article

  • Core Location question....

    - by Moshe
    This tutorial on mobileorchard.com uses 2 classes (or 2 sets of .h and .m) to implement core location. Can I just use everything there in my existing class? How would I do that? Also, is the - (id) init { self = [super init]; if (self != nil) { self.locationManager = [[[CLLocationManager alloc] init] autorelease]; self.locationManager.delegate = self; // send loc updates to myself } return self; } method the same as the usual initWithNib? I;m trying to quickly implement something based on location information. As much help describing the above linked tutorial would be helpful. Thanks. No - really, Thank You.

    Read the article

  • I need to load a video stored in Applications folder in to a UITableView ?

    - by srikanth rongali
    I need to load a video stored in Applications folder in to a table view. When I touched the cell the video plays. I used the following code to get all the video files in to an array. NSFileManager *fileManager = [NSFileManager defaultManager]; NSArray* contents = [fileManager directoryContentsAtPath:@"/Users/srikanth/Desktop/Projects/UF/Table2/Videos"]; for(a = 1; a < [contents count]; a++) NSLog(@"Array contents: %@", [contents objectAtIndex:a]); cells = [[NSMutableArray alloc]initWithCapacity:[contents count]]; But how can I load the videos into UITableView. I used NSBundle for loading videos by giving path. It worked. But, now I need the videos to load from the array contents. When I touch the cell of the table the corresponding file from the array contents si to be loaded. How can I make it? Thank you.

    Read the article

  • Great UIKit/Objective-C one-Liners

    - by Nissan Fan
    New to Objective-C iPhone/iPod touch/iPad development, but I'm starting to discover lots of power in one-liners of code such as this: [UIApplication sharedApplication].applicationIconBadgeNumber = 10; Which will display that distinctive red notification badge on your app iphone with the number 10. Please share you favorite one-liners in Objective-C for the iPhone/iPod touch/iPad here.

    Read the article

  • Easiest way to support multiple orientations? How do I load a custom NIB when the application is in

    - by Peter Hajas
    Hi there, I have an application in which I would like to support multiple orientations. I have two .xib files that I want to use, myViewController.xib and myViewControllerLandscape.xib. myViewController.xib exists in project/Resources and myViewControllerLandscape.xib exists in the root project directory. What I want to do is use a separate NIB (myViewControllerLandscape.xib) for my rotations. I try detecting rotation in viewDidLoad like this: if((self.interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (self.interfaceOrientation == UIInterfaceOrientationLandscapeRight)) { NSLog(@"Landscape detected!"); [self initWithNibName:@"myViewControllerLandscape" bundle:nil]; } But I can see in gdb that this isn't executed when the app is started with the device in landscape. The NSLog message doesn't fire. Why is this? What have I done wrong? Also, if I explicitly put the initWithNibName function call in the viewDidLoad method, that nib is not loaded, and it continues with the myViewController.xib file. What's wrong with my call? Should I specify a bundle? Thanks!

    Read the article

  • AudioQueueOfflineRender returning empty data

    - by hyn
    I'm having problems using AudioQueueOfflineRender to decode AAC data. When I examine the buffer after the call, it is always filled with empty data. I made sure the input buffer is valid and packet descriptions are provided. I searched and found that a few others have had the same problem: http://lists.apple.com/archives/Coreaudio-api/2008/Jul/msg00119.html Also, the inTimestamp argument doesn't make sense to me. Why should the renderer care where in the audio the beginning of the buffer corresponds to? The function throws an error if I pass in NULL, so I pass in the timestamp anyway.

    Read the article

  • decompressing .gZ file from Document directory?

    - by senthilmuthu
    hi, i am having .gZ (zip file) in document directory.i want unZip it.but i am using libz.dylib framework .will it decompress and save all data to that file path?how can i get that extracted data?any has experienced in doing this?any help?when i use the method,but when i put break point, it returns data error(used in NSLog)--Z_DATA_ERROR-- - (id)initWithGzippedData: (NSData *)gzippedData; { [gzippedData retain]; if ([gzippedData length] == 0) return nil; unsigned full_length = [gzippedData length]; unsigned half_length = [gzippedData length] / 2; NSMutableData *decompressed = [[NSMutableData alloc] initWithLength:(full_length + half_length)]; BOOL done = NO; int status; z_stream strm; strm.next_in = (Bytef *)[gzippedData bytes]; strm.avail_in = [gzippedData length]; strm.total_out = 0; strm.zalloc = Z_NULL; strm.zfree = Z_NULL; if (inflateInit2(&strm, (15+32)) != Z_OK) { [gzippedData release]; [decompressed release]; return nil; } while (!done) { // Make sure we have enough room and reset the lengths. if (strm.total_out >= [decompressed length]) [decompressed increaseLengthBy: half_length]; strm.next_out = [decompressed mutableBytes] + strm.total_out; strm.avail_out = [decompressed length] - strm.total_out; // Inflate another chunk. status = inflate (&strm, Z_SYNC_FLUSH); if(status == Z_DATA_ERROR) { NSLog(@"data error"); } if (status == Z_STREAM_END) done = YES; else if (status != Z_OK) break; } if (inflateEnd (&strm) != Z_OK) { [decompressed release]; return nil; } // Set real length. [decompressed setLength: strm.total_out]; id newObject = [self initWithBytes:[decompressed bytes] length:[decompressed length]]; [decompressed release]; [gzippedData release]; return newObject; }

    Read the article

  • actionscript calling javascript with Security Exception

    - by Jeffrey Chee
    I have a swf hosted at domain A, and I have a html at domain B My swf is able to be loaded from accessing the html at domain B. However, the swf gets a SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller http://domainA.com/TrialApp.swf cannot access http://DomainB.com/. The as3 is just the below: ExternalInterface.call("javascript:_invite();"); I've also loaded the crossdomain policy file from Domain B during initialization. Security.loadPolicyFile( "http://DomainB/crossdomain.xml" ); How do I go about solving this? in my html, I have allowscriptaccess='always' Thanks in Advance

    Read the article

  • iPhone 4.0 on iPhone but still Ad-Hoc compile for 3.1.3?

    - by Mark
    Device: Version : 3.1 Build: 3511 Device: iPhone OS: iPhone OS 4.0 xCode 3.2.2 (Old) xCode 3.2.3 (New; For iPhone 4.0 Beta) Background: As you can see I installed 4.0 on my iPhone as I read on this forum it's really hard to near impossible to downgrade back to 3.1.3, but it's my only device I have and use for development. When I try to continue to develop and build with the old xCode it tells me that "No provisioned iPhone OS device is connected". When I select Simulator it does compile and build, however when I spread this file it does not work on the devices of my testers, they get a Signed error. When I run the new xCode, it does compile and build on the Device and when I spread this file, it does work on the devices of my testers (which are running the current official version 3.1.3). Questions: Why is there a difference between building for Simulator and Device? A simulator build never seem to work on the devices of my testers because of signing issues and the build for device does work. Currently it seems the old xCode became useless, however I read that you may not use the Beta xCode to build your application for release. So knowing the above how am I able to pull this off with my current setup due the fact the old xCode won't let me build properly.

    Read the article

  • Touch event in CPLayerHostingView?

    - by senthilmuthu
    Hi, i am using Core-plot . but when i declare the normal UIView as CPLayerHostingView,how can i handle drawRect of that view , i cant give another custom UIview name and write code in drawRect of that view?please any help to handle drawRect of CPLayerHostingView?

    Read the article

  • how to create iPhone main menu screen with 2 tabbars subview ?

    - by Boaz
    Hi. I made two applications that each one of them is tabbar based. Now I want to combine them to one app that will be struct like that: -Main menu with 2 buttones. - button 1: tab bar app no 1. - button 2: tab bar app no 2. from each tab bar app, I want an Home button on the left side of the nav bar that will take me to the main menu. I found this link http://www.pushplay.net/blog_detail.php?id=27 but it's not good to me.. I will be happy if you will able to post some simple code for my problem.. Thanks.

    Read the article

  • NSPredicate acting strange in NSFetchedResultsController

    - by Scott Langendyk
    I feel as if this should be very simple, but it's behaving strangely. I have 3 entities, with a relationship as such Entity A <-- Entity B <<-- Entity C I have an NSFetchedResults controller and I'm trying to filter the results of Entity A using the following predicate. [NSPredicate predicateWithFormat:@"NONE entityB.entityC == %@", self.entityC]; When I try and run the app, the output shows no results. I can alter the predicate slightly to: [NSPredicate predicateWithFormat:@"ANY entityB.entityC == %@", self.entityC]; And it shows me only the results that I want it to filter out. Why is this happening?

    Read the article

  • iPhone localization - some localized XIBs do not load

    - by Jacek
    Hello, I have made an iPhone app with localized versions. It mostly works fine, but there are two views in which localized NIBs do not load. Standard NIBs (in English) are used. I am sure I made localization properly ("Get Info", "Make file localizable", "Add Localization", added "pl" - for Polish, and then edited created NIB). All the other views are fine. What might be the problem? Thanks for helping me.

    Read the article

  • How to use CFNetwork to get byte array from sockets?

    - by Vic
    Hi, I'm working in a project for the iPad, it is a small program and I need it to communicate with another software that runs on windows and act like a server; so the application that I'm creating for the iPad will be the client. I'm using CFNetwork to do sockets communication, this is the way I'm establishing the connection: char ip[] = "192.168.0.244"; NSString *ipAddress = [[NSString alloc] initWithCString:ip]; /* Build our socket context; this ties an instance of self to the socket */ CFSocketContext CTX = { 0, self, NULL, NULL, NULL }; /* Create the server socket as a TCP IPv4 socket and set a callback */ /* for calls to the socket's lower-level connect() function */ TCPClient = CFSocketCreate(NULL, PF_INET, SOCK_STREAM, IPPROTO_TCP, kCFSocketDataCallBack, (CFSocketCallBack)ConnectCallBack, &CTX); if (TCPClient == NULL) return; /* Set the port and address we want to listen on */ struct sockaddr_in addr; memset(&addr, 0, sizeof(addr)); addr.sin_len = sizeof(addr); addr.sin_family = AF_INET; addr.sin_port = htons(PORT); addr.sin_addr.s_addr = inet_addr([ipAddress UTF8String]); CFDataRef connectAddr = CFDataCreate(NULL, (unsigned char *)&addr, sizeof(addr)); CFSocketConnectToAddress(TCPClient, connectAddr, -1); CFRunLoopSourceRef sourceRef = CFSocketCreateRunLoopSource(kCFAllocatorDefault, TCPClient, 0); CFRunLoopAddSource(CFRunLoopGetCurrent(), sourceRef, kCFRunLoopCommonModes); CFRelease(sourceRef); CFRunLoopRun(); And this is the way I sent the data, which basically is a byte array /* The native socket, used for various operations */ // TCPClient is a CFSocketRef member variable CFSocketNativeHandle sock = CFSocketGetNative(TCPClient); Byte byteData[3]; byteData[0] = 0; byteData[1] = 4; byteData[2] = 0; send(sock, byteData, strlen(byteData)+1, 0); Finally, as you may have noticed, when I create the server socket, I registered a callback for the kCFSocketDataCallBack type, this is the code. void ConnectCallBack(CFSocketRef socket, CFSocketCallBackType type, CFDataRef address, const void *data, void *info) { // SocketsViewController is the class that contains all the methods SocketsViewController *obj = (SocketsViewController*)info; UInt8 *unsignedData = (UInt8 *) CFDataGetBytePtr(data); char *value = (char*)unsignedData; NSString *text = [[NSString alloc]initWithCString:value length:strlen(value)]; [obj writeToTextView:text]; [text release]; } Actually, this callback is being invoked in my code, the problem is that I don't know how can I get the data that the windows client sent me, I'm expecting to receive an array of bytes, but I don't know how can I get those bytes from the data param. If anyone can help me to find a way to do this, or maybe me point me to another way to get the data from the server in my client application I would really appreciate it. Thanks.

    Read the article

  • Hide button on first of two UIViews, but have it visible on second...

    - by Scott
    So I have a UIViewController (main application controller is a TabBarController). On this there is a UINavigationBar, and a UIBarButtonItem. I'm PRETTY sure I hooked up everything correctly in the Interface Builder and that the outlet in the code is connected to the button in the .xib. It should be because the method works correctly. Now I have another button on this view that brings up a second view, a UIWebView. I want this UIBarButtonItem, labeled "Back", to make the UIWebView dissapear, and bring back the first UIView, which it DOES DO correctly. However, when you are on the first UIView, there is no need to see the UIBarButtonItem, so how can I hide it but then bring it up for the UIWebView. By the way, both views use the same UINavigationBar, the UIWebView is brought up inside the tab bar and the nav bar. Here is my code: #import "WebViewController.h" @implementation WebViewController @synthesize webButton; @synthesize item; @synthesize infoView; UIWebView *webView; + (UIColor*)myColor1 { return [UIColor colorWithRed:0.0f/255.0f green:76.0f/255.0f blue:29.0f/255.0f alpha:1.0f]; } // Creates Nav Bar with default Green at top of screen with given String as title + (UINavigationBar*)myNavBar1: (NSString*)input { UIView *test = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; UINavigationBar *navBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0.0, 0.0, test.bounds.size.width, 45)]; navBar.tintColor = [WebViewController myColor1]; UINavigationItem *navItem; navItem = [UINavigationItem alloc]; navItem.title = input; [navBar pushNavigationItem:navItem animated:false]; return navBar; } - (IBAction) pushWebButton { self.navigationItem.rightBarButtonItem = item; CGRect webFrame = CGRectMake(0.0, 45.0, 320.0, 365.0); webView = [[UIWebView alloc] initWithFrame:webFrame]; [webView setBackgroundColor:[UIColor whiteColor]]; NSString *urlAddress = @"http://www.independencenavigator.com"; NSURL *url = [NSURL URLWithString:urlAddress]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; webView.scalesPageToFit = YES; [webView loadRequest:requestObj]; [self.view addSubview:webView]; [webView release]; } - (void) pushBackButton { [webView removeFromSuperview]; } // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { self.navigationItem.rightBarButtonItem = nil; [super viewDidLoad]; } @end Anyone know?

    Read the article

  • is there a way to show Uitableviewcell selection on limited frame?

    - by Rahul Vyas
    i have a uitableview cell added some labels something like this - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; UIImage* myImage = [UIImage imageNamed:@"AccessoryForDealsMain.png"]; UIImageView *MyimageView = [[UIImageView alloc] initWithImage:myImage]; MyimageView.contentMode=UIViewContentModeScaleToFill; cell.accessoryView=MyimageView; [MyimageView release]; UILabel *BluePatti = [[UILabel alloc] init]; BluePatti.frame=CGRectMake(0,0,4,44); BluePatti.backgroundColor = BLUEPATTI;//[UIColor blueColor]; UILabel *BlackLine = [[UILabel alloc] init]; BlackLine.frame=CGRectMake(3,0,1, 45); BlackLine.backgroundColor = BLACK_LINE; [BluePatti addSubview:BlackLine]; [BlackLine release]; [cell.contentView addSubview:BluePatti]; [BluePatti release]; UILabel *Seperator = [[UILabel alloc] initWithFrame:CGRectZero]; Seperator.backgroundColor = [UIColor colorWithRed:234/256.0 green:234/256.0 blue:234/256.0 alpha:1.0]; //[UIColor lightGrayColor]; Seperator.frame = CGRectMake(4,43,316,1); [cell.contentView addSubview:Seperator]; [Seperator release]; } if(indexPath.section==5) { cell.textLabel.text=[self.GenderCellData objectAtIndex:indexPath.row]; cell.textLabel.textColor=CELL_TEXT_COLOR; cell.textLabel.font=CELL_FONT; } else { cell.textLabel.text=@"Cells"; cell.textLabel.font=CELL_FONT; } return cell; } now when i touch cell it shows blue selection above all subviews.How do i change selection frame and colour?

    Read the article

  • Android - Clicking on notification in status bar binds the intent with the target activity

    - by araja
    I have created an activity which sends a number of notifications to status bar. Each notification contains an intent with a bundle. Here is the code: String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); int icon = R.drawable.icon; long when = System.currentTimeMillis(); Notification notification = new Notification(icon, "Test Notification", when); Context context = getApplicationContext(); Bundle bundle = new Bundle(); bundle.putString("action", "view"); Intent notificationIntent = new Intent(this, MainActivity.class); notificationIntent.putExtras(bundle); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, Intent.FLAG_ACTIVITY_NEW_TASK); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); mNotificationManager.notify(1, notification); When user clicks this notifications, I read the bundle string "action" and performs that action. Here is the code: Bundle bundle = this.getIntent().getExtras(); if(bundle != null) { String action = bundle.getString("action"); performAction(action) } Everything works as expected. But, when I minimize the app using "arrow" button on device and then press and hold home button and clicks on my app icon the application starts and performs the same last action which have been performed by clicking the last notification. I figured out that when we click the app icon the application starts with last intent triggered by the notification. Can anyone help in this?

    Read the article

< Previous Page | 195 196 197 198 199 200 201 202 203 204 205 206  | Next Page >