Search Results

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

Page 160/635 | < Previous Page | 156 157 158 159 160 161 162 163 164 165 166 167  | Next Page >

  • How to email CLLocationCoordinate2D as a link

    - by lucasweb
    I am trying to emulate the Maps 'Share Location' via email functionality. I have the latitude and longitude of my location and am currently using it to display the location on a map via MKMapView. I also have functionality that composes an email from the app and I would like to include the location in it but can not figure out how to construct a link, using the longitude and latitude. I have seen other apps with apps with this functionality so I know it is possible. Any help would be much appreciated. Thanks in advance.

    Read the article

  • unclear use of @property in window app using core data

    - by Matt
    Looking through a Window based application ive used to experiment with as a way of getting my head around core data, ive noticed that the appdelegate has the following code myAppDelegate.h #import <UIKit/UIKit.h> #import <CoreData/CoreData.h> @interface iCaptureFreeAppDelegate : NSObject <UIApplicationDelegate> { NSManagedObjectModel *managedObjectModel; NSManagedObjectContext *managedObjectContext; NSPersistentStoreCoordinator *persistentStoreCoordinator; UIWindow *window; UITabBarController *tabBarController; } myAppDelegate.m #import "myAppDelegate.h" @interface iCaptureFreeAppDelegate (PrivateCoreDataStack) @property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel; @property (nonatomic, retain) NSManagedObjectContext *managedObjectContext; @property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator; @end @implementation iCaptureFreeAppDelegate @synthesize window, tabBarController; // code .... // - (NSManagedObjectContext *) managedObjectContext { } - (NSManagedObjectModel *)managedObjectModel { } - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { } // etc..... i want to understand a few things about what this project is doing why the properties in the category declaration? (if i delete the privateCoreDataStack category everything still works...) why the properties appear to be linked with the methods in the implementation ... managedObjectContext {} etc why the members in the .h file have the same name as the properties and the methods why code completion lets me use dot '.' to access the members but then fails on compilation say it cant find a getter thanks !

    Read the article

  • How can we add scrolling text in cocos2d by using UITextView ?

    - by srikanth rongali
    I want a UITextView in cocos2d. I used in init method I wrote the code, UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0, windowSize.height/2,windowSize.width/2)]; textView.backgroundColor = [UIColor clearColor]; textView.text = @"I am First enemy"; [textView setEditable:NO]; [[[CCDirector sharedDirector]openGLView]addSubview:textView]; the orientation is [[CCDirector sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft]; I need the text to appear in landscape mode, but I am getting the text in following way. How can I make the text to appear in the landScape mode. I am working in cocos2d. CanOI scroll the text ? What should i add to make the text scroll up and down. Thank you.

    Read the article

  • UINavigationController from scratch?

    - by Moshe
    I have a view based app that works well. (In other words, I'm not going to start over with a Navigation-Based App template.) It's an immersive app of sorts and I'm trying to add a Table View that loads in a new view when a button is pressed. The loading the nib part works, but I can't seem to be able to add a navigation controller to the new view. I want to see a navigation bar on top with a done button and an edit button. Also, I want to the Table View entries to be empty. I added a new file like so: File-> New File -> UINavigationController subclass. I checked the UITableViewController Subclass and With XIB for user interface. All I see when the view is pulled up is a blank Table View. I am able to customize things in the view controller. What can I do to make the table show a navigation bar and be editable? I need some direction here please. EDIT: I'm working with the latest Public SDK. (XCode 3.2.2)

    Read the article

  • UIButton not getting touch events inside a custom UITableViewCell

    - by user210504
    Hi! I have designed a custom UItableView Cell in IB. This cell has a UIButton with an associated action. This button is not getting touch events, however the cell itself gets the events when called. What could I be doing wrong here. +--------------------------------+ | +----------+ | Cell | Button | | +----------+ +--------------------------------+ When I tap on the Button tableviewcell gets the events. What could be wrong? EDIT: I just checked, that UIButton is also getting touch events, but so is the UITableViewCell. And at then end of it the action associated with UIButton is not getting called.

    Read the article

  • How to use the variable declared in one class in another class in Obj C.

    - by srikanth rongali
    I have a NSDate *date1 in class1 implementation file(I initialized it as Global variable). I have NSDate *date2 in class 2 implementation file (initialized it as Global variable). I need to calculate the NSTimeInterval between the two dates in class 2. But I could not do it. I could not access date1 in this class. It is giving error as (date2 undeclared). Please give me help in how to call other class variables in this class. Thank you.

    Read the article

  • Generating an NSDictionary from an SQL statement.

    - by Ed Wist
    I am trying to generate an NSDictonary that can be used to populate a listview with data I retrieved from an SQL statement. when I go to create an array and add them it adds the arrays for ALL my keys and not just for the current key. I've tried a removeAllObjects on the array but for some reason that destroys ALL my data that I already put in the dictionary. //open the database if(sqlite3_open([dbPath UTF8String], &database) == SQLITE_OK) { const char *sql = "select alphaID, word from words order by word"; sqlite3_stmt *selectStatement; //prepare the select statement int returnValue = sqlite3_prepare_v2(database, sql, -1, &selectStatement, NULL); if(returnValue == SQLITE_OK) { NSMutableArray *NameArray = [[NSMutableArray alloc] init]; NSString *alphaTemp = [[NSString alloc] init]; //loop all the rows returned by the query. while(sqlite3_step(selectStatement) == SQLITE_ROW) { NSString *currentAlpha = [NSString stringWithUTF8String:(char *)sqlite3_column_text(selectStatement, 1)]; NSString *definitionName = [NSString stringWithUTF8String:(char *)sqlite3_column_text(selectStatement, 2)]; if (alphaTemp == nil){ alphaTemp = currentAlpha; } if ([alphaTemp isEqualToString:(NSString *)currentAlpha]) { [NameArray addObject:definitionName]; } else if (alphaTemp != (NSString *)currentAlpha) { [self.words setObject:NameArray forKey:currentAlpha]; [NameArray removeAllObjects]; [NameArray addObject:definitionName]; } } } The Statement above adds all the "keys" but then removes all the array elements for all keys. if I take out the removeAllKeys it adds ALL the array elements for ALL keys. I don't want this I want it to add the array elements FOR the specific key then move on to the next key. in the end I want a NSDictonary with A (array) Alpha (string) Apple (string) B (array) Beta (string) Ball (string) C (array) Code (string) ...

    Read the article

  • How can we make the text to appear in landscape mode in cocos2d by using UITextView ?

    - by srikanth rongali
    I want a UITextView in cocos2d. I used in init method UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0, windowSize.height/2,windowSize.width/2)]; textView.backgroundColor = [UIColor clearColor]; textView.text = @"I am First enemy"; [textView setEditable:NO]; [[[CCDirector sharedDirector]openGLView]addSubview:textView]; the orientation is [[CCDirector sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft]; I need the text to appear in landscape mode, but I am getting the text in following way. How can I make the text to appear in the landScape mode. I am working in cocos2d. CanOI scroll the text ? What should i add to make the text scroll up and down. Thank you.

    Read the article

  • Is there a way to know when the index on uitableview is actually used?

    - by NoviceiPhoneProgrammer
    Is there a way to know when the index on uitableview is actually used? I can’t find any methods in the Apple documentation, but I was wondering if anyone else knows anything. I would basically like to make an animation in my table view that changes depending on what section is selected in the index, and I have no idea how to do this without accessing the table view index. Any help is greatly appreciated. Thanks.

    Read the article

  • ABPeoplePicker select and return SELECTED phone number

    - by palominoz
    Under (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *) peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier{} is it possible to get returned the phone number or somewhat the user has clicked?

    Read the article

  • How can I access the int values of an object in an NSMutableArray?

    - by Daniel
    I try to access some values in a NSMutableArray I created, but I only get some numbers (address?) if I try to access them. I was able to initialize an array and can add and change objects with [myNSMutableArray addObject:[NSNumber numberWithInt:10]] and [myNSMutableArray replaceObjectAtIndex:0 withObject:[NSNumber numberWithInt:47] I also can print the value at index [0] with NSLog(@"%@", [myNSMutableArray objectAtIndex:0]); and I get 47 as expected. But how can I access the integer value of the object in the array so I can save it tomyIntValue?

    Read the article

  • Writing the code iby dividing it into more files.

    - by srikanth rongali
    My problem is, I need a background image, a sprite(with animation) on left edge, another sprite(with animation) at other edge, a number count animation 1-2-3 at middle. I got all these when I wrote all in same file.(like [self addChild:label], [self addChild:sprite].., But in this it needs touch enables for both sprites separately, and touchDisabled to the remaining screen. So thought of writing in different files. But now it is not working. I kept one sprite, background image, numbercount in one file and another spritr in other file. Either I am getting the second sprite or the (sprite+background+numberCount) is displayed. This is my problem. plz give me solution. Thank You

    Read the article

  • Writing the code by dividing it into more files in cocoatouch.

    - by srikanth rongali
    My problem is, I need a background image, a sprite(with animation) on left edge, another sprite(with animation) at other edge, a number count animation 1-2-3 at middle. I got all these when I wrote all in same file.(like [self addChild:label], [self addChild:sprite].., But in this it needs touch enables for both sprites separately, and touchDisabled to the remaining screen. So thought of writing in different files. But now it is not working. I kept one sprite, background image, numbercount in one file and another spritr in other file. Either I am getting the second sprite or the (sprite+background+numberCount) is displayed. This is my problem. plz give me solution. Thank You

    Read the article

  • Moving the table view and keep the toolbar visible?

    - by Jakub
    Hello, In my view I have a toolbar with a button at the top and a table view underneath, like in the following picture: An you can see there are text fields in the cells of the table view. The problem appears when I want to edit the tet fields which are in the bottom of the table view. As you can imagine the keyboard overlaps the text fields. Let say I want to edit the fields in the C section, the result is following: I tried different approaches for moving the table view, but I always end up with the toolbar being hidden. In one cae the toolbar was moving up with together with the table view, in the second case the table view overlaps the toolbar: All the ideas how to move the table view to make the cell being edited visible together with having the toolbar visible? How to move/resize the table view? Thanks!

    Read the article

  • How to use accessors within the same class in Objective C?

    - by Azeworai
    Hi, I have a few properties defined in my header file like so @property (assign) bool connectivity_N; @property (assign) bool isConnected_N; In my implementation file I have an init and the synthesized properties like so @implementation Map @synthesize connectivity_N; @synthesize isConnected_N; a init to set the initial values like so -(id) init { if( (self=[super init]) ) { //initialise default properties self.connectivity_N=NO; self.isConnected_N=NO; } return self; } I'm running into an error that states Error: accessing unknown 'connectivity_N' class method. In this public method within the class +(bool) isConnectable:(directions) theDirection{ bool isTheDirectionConnectable= NO; switch (theDirection) { case north: isTheDirectionConnectable= self.connectivity_N; break; I'm not sure why is this so as I'm trying to grab the value of the property. According to the apple developer documentation "The default names for the getter and setter methods associated with a property are propertyName and setPropertyName: respectively—for example, given a property “foo”, the accessors would be foo and setFoo:" That has given me a clue that I've done something wrong here, I'm fairly new to objective C so would appreciate anyone who spends the time to explain this to me. Thanks!

    Read the article

  • Change UITableView Cell Image using IF Statement?

    - by Graeme
    I want to add an image using the cell.imageView setImage: method. However, depending on field from an array (in the form of an NSString and called using [dog types]) I need the image to change to an image which reflects the type of dog. How do I go about doing this? Thanks.

    Read the article

  • Push notification or thread with timer

    - by neha
    Hi all, In my application, I'm having functionality like twitter that when you have not refreshed your screen, and if there're new messages then you get this message that "You have n new messages" and a refresh button, which on press will refresh the screen. I'm basically fetching all the data from an xml with some url. In case of thread, I need to call a timer after some time period which might affect the app performance. Can anybody please suggest wheather what will be better to use push notifications or thread with timer? Thanx in advance.

    Read the article

  • Problem mapping data located in a NSMutableArray

    - by Graeme
    I have an NSMutableArray which contains some addresses which I need to map using Apple's MapKit SDK which I can't seem to get to load. The NSLog keeps telling me that the data source is (null) and a 0x0 error displays when I attempt to print out the array. Any ideas? The data is parsed and stored from another class, perhaps I'm not linking it across properly? The data is originally gathered from an RSS feed, bought into the app with an IMporter class, and then displayed in a table view. I want to be able to connect into that data with my mapping class, but am struggling to do so.

    Read the article

  • What method of UIView gets called when instantiated from a NIB?

    - by retailevolved
    I have a simple custom view that is connected via outlet to a NIB. For this particular view, there are actions that I would like to perform on the view when it is initialized, no matter what NIB it is on. Trouble is, neither the (id)init or the (id)initWithFrame:(CGRect)frame methods are getting called on the custom view. Which method gets called on a UIView when it is instantiated from a NIB? I would just use the view controller and viewDidLoad method except that this particular view appears on a lot of different NIBs.

    Read the article

  • uiscrollview not scrolling horizontally

    - by Futur
    My UIScrollView below is not scrolling horizontally, Please help me here.. FirstView = [[UIView alloc] initWithFrame:CGRectMake(60, 0, 100, 150)]; [FirstView setBackgroundColor:[UIColor clearColor]]; SecondView = [[UIView alloc] initWithFrame:CGRectMake(320+60, 0, 100, 150)]; [SecondView setBackgroundColor:[UIColor clearColor]]; HolderView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 1000, 150)]; scrHorizontalScroll = [[UIScrollView alloc]initWithFrame:HolderView.frame]; [scrHorizontalScroll setBackgroundColor:[UIColor redColor]]; [scrHorizontalScroll setContentSize:CGSizeMake(999, 150)]; [scrHorizontalScroll setScrollEnabled:YES]; [HolderView addSubview:scrHorizontalScroll]; The HolderView is not scrolling horizontally but which happen, please help

    Read the article

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