How can I enter RGB or Hex color values for backgrounds in Interface Builder? I can select predefined colors but I would like to manually enter in RGB values. Where can I do this?
I'd like to make my app to open a specified PDF by an external app of the user's choice on the iPad. How can I do that? Or, is there any open-source PDF reader framework available so that I can put it into my app?
My situation in more detail:
I'm thinking of porting to the iPad from OS X / rewriting from scratch for the iPad an app which manages lots of PDFs (journal articles, etc.), but I don't want to write the PDF reader part, because there are many good ones already out there; I don't want to reinvent the wheels.
(You might say you shouldn't reinvent pdf management apps, but I'd like to make one as a front end to SPIRES, and there isn't one so far.)
As the app would be a front end to a serious reading activity, UIWebView's pdf capability is not enough.
Also, users of my app would have various preferences which app to use.
That's the background behind my question. Thanks in advance!
What are all the file formats supported by UIWebView?
In my testing, I found that it supports XLS, DOC, PPT, PDF but not XLSX, and DOCX, RTF.
It supports image files like, JPG, PNG, GIF, BMP, not sure about TIFF or
Exactly, what all types are supported is not clear...
The UIWebView documentation also doesn't state it clearly.
Could someone please help?
I have a CATiledLayer within a UIView and the UIView also contains a subview.
How can I make sure that the subview is always drawn above the layer?
Most of the time I get the tile layer covering the subview.
In my past applications I have been #importing into my *.h files where needed. I have not really thought much about this before as I have not had any problems, but today I spotted something that got me to thinking that maybe I should be #import-ing into my .m files and using @class where needed in the headers (.h) Can anyone shine any light on the way its supposed to be done or best practice?
gary
I have the following code to create a UIPickerView:
pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0f, 416.0f - height, 320.0f, height)];
pickerView.delegate = self;
pickerView.showsSelectionIndicator = YES;
[pickerView setSoundsEnabled:YES];
I would like to change the component widths and change the text size in each component. Is it possible to do this?
Thanks!
Hello,
I want to add a resize function to my app which works like the integrated copy feature on the iPhone. When the user opens the view he should see the image with the four blue dots which enable him to resize it. Is there an available example for this? Or has anyone the keywords for this functionality, which i can use for my further Search?
Thanks for all tips and hints
I have a custom UITableViewCell which I have created in IB. My labels display when I don't over-ride:
- (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath
however my content is squished. I want the height to be 120px so I have the following:
- (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{ CGFloat rowHeight = 120;
return rowHeight;
}
I'm not sure why the content inside of my UITableViewCell all of a sudden disappears?
I am using push scene to get the next scene. But, I read that for each PushScene the scene is stored in stack. The memory usage is more. So, I am using the replaceScene in place of pushScene. But, with replace scene I am getting the memory-bad-access message in debugger.
So, I want to popScene after using it, so that the retain count is zero. But, I am confused in using popScene.
If I have a Scene1 and Scene2. I used the following to go in to Scene2. Now I need to remove Scene1 from stack.
[[CCDirector sharedDirector] pushScene:Scene2];
Where should I write the popScene to popScene1. How to get the previous scene in current running scene ?
Thank you/
Seems like a simple thing but I can't seem to find a way to do it.
I saw this but it doesn't seem to work:
NSDate *date = [NSDate dateWithNaturalLanguageString:@"07/17/07"];
It would be great to see a couple different methods.
Thanks,
Nick
Hi,
I am writing a small game in cocos2d. I am adding child
[ self addChild: sprite1];
Should I remove these before going to next scene by using
[self removeChild: sprite1 cleanup:YES];
Does it increase the performance in device ?
Thank You.
I'm wanting to create a view (UIControl) which blocks all input and shows a UIActivityIndicatorView while authenticating a user.
The UIActionSheet and UIAlertView both manage to add a black semi-transparent view over the top of all other views to block input and I'd like to do similar.
I've tried adding my view to the top UIWindow in the [[UIApplication sharedApplication] windows] array, and while this does place it above the UIKeyboard if it's visible, it doesn't place it over the StatusBar (which makes sense).
My next attempt was to extend UIAlertView, remove all of its subviews and set its layer.contents = nil, then add the ActivityIndicator as a subview. This works well, but I can't seem to kill the default bouncy transition of the UIAlertView when you call it to "show".
Does anyone have any pointers towards the best way tackle this problem that gives me full control?
Oh and I know blocking input is not great but I do ensure it's for a short period of time and it has the benefit of making it clear to the user that their action, which must complete for them to progress, is processing.
I have an app that has a username and password field. I want to validate the input before the the user is allowed to stop editing the field. To do that, I'm using the textFieldShouldEndEditing delegate method. If the input doesn't validate I display a UIAlertView.
This approach works as advertised - the user cannot leave the field if the input doesn't validate.
To have the done button on the keyboard dismiss the keyboard, I call resignFirstResponder on the textfield.
The issue I have is the alert is being called twice. How do I keep the alert from showing twice?
I have a UIBarButtonItem opening an action sheet to offer users choices about what to do. Everything works as expected unless I try to click on the "Cancel" button. The target of the button appears to have moved up from where it should be. I can only activate it by clicking somewhere in the middle of the "Cancel" and "Ok" buttons.
I've tried at action sheets in other applications and they work fine, so it's not just my big thumb. The action sheet is opening in a UIViewController
- (void)showOpenOptions
{
UIActionSheet *sheet = [[UIActionSheet alloc]
initWithTitle:NSLocalizedString(@"Open link in external application?", @"Open in external application")
delegate:self
cancelButtonTitle:NSLocalizedString(@"Cancel", @"Cancel")
destructiveButtonTitle:NSLocalizedString(@"Open Link", @"Open Link")
otherButtonTitles:nil];
[sheet showInView:self.view];
[sheet release];
}
I have a uinavigationcontroller with 2 views. In the second view I have some audio playing. When I click the back navigation item on the navigation bar the audio still plays. How do I end the process of anything happening in the second view when the user clicks back to the initial view.
Thanks for your help.
I'm fairly new to iPhone programming and am trying to implement a double-component PickerView. At this point the picker works fine in terms of taking user input, created with Interface Builder. However, I need to change the font size to accommodate the text length in each column. I very much would appreciate any link to a straightforward method to creating a multi-component picker with an adjustable font size. Seems like it is not possible if Interface Builder is used to create the picker. So far I have not found any code links that address this issue in detail.
Thanks in advance.
Hello,
I'm trying to figure out how to group items like the grouped mail boxes in the mail app. I need it to be like selecting a mail box, when you tap it it loads new data, your inbox outbox and all of the other boxes for that mail account. Then you can tap back and return to all of your accounts. If anyone has a little sample code they could show or explain how one might go about doing this any help is appreciated. (Note: Im using the split view template)
Thanks
I have a ViewController with a view (UIView). I need to handle touches, run some logic, check against model data, and and add and remove sublayers to the view based on those touches. Then I need to update the model based on the results.
Should I have:
ViewController - manage touches, get/set model data, add/remove sublayers
UIView
CALayer
Sublayers
or
Controller (NSObject) - get/set data
ViewController - manage touches, add/remove sublayers
UIView
CALayer
Sublayers
or
Controller (NSObject) - get/set data
CustomView - manage touches, add/remove sublayers
CALayer
Sublayers
Or is it something else all together? No matter what I try, it "feels" awkward. SVN is my friend.
Can you guys help a girl (with architectural issues) out?
I have common functionality that I need to access from all screens of my app: a right bar button item and associated action.
So as not to repeat the code I would like to set this up in a custom UIViewController and have all my view controllers inherit from it.
- (void)viewDidLoad {
UIBarButtonItem *rightBarButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPlay target:self action:@selector(lightsCamera)];
self.navigationItem.rightBarButtonItem = rightBarButton;
}
- (void)lightsCamera {
…
}
However, I have a number of UITableViewControllers however and I would like to know if it is possible for them to inherit the functionality too?
After going into Edit mode, moving a cell, and leaving edit mode, i am left with one extra cell sitting on top of its duplicate cell while still in edit mode.
The problem has to be somewhere in here:
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath {
NSMutableArray *array = [[fetchedResultsController fetchedObjects] mutableCopy];
id objectToMove = [[array objectAtIndex:sourceIndexPath.row] retain];
[array removeObjectAtIndex:sourceIndexPath.row];
[array insertObject:objectToMove atIndex:destinationIndexPath.row];
[objectToMove release];
for (int i=0; i<[array count]; i++) {
[(NSManagedObject *)[array objectAtIndex:i] setValue:[NSNumber numberWithInt:i] forKey:@"userOrder"];
}
[array release];
}
Any guidance greatly appreciated!
In the tableView:accessoryButtonTappedForRowWithIndexPath: selector, I want to update the backgroundColor of the cell.
I can get the UIViewTableCell using cellForRowAtIndexPath: but I'm not sure how I can update its background color. The code beliw doesn't seem to work.
[_tableView beginUpdates];
cell.backgroundColor = [UIColor grayColor];
[_tableView endUpdates];
Any suggestions?
I am beginning iPhone application developer, and so I'm not sure how to start the creation of a navigation-controller-based application which uses a tab bar controller in part of it. Do you have suggestions for where to start with this?
hellow all, in xcode whenever we load a mapview ,it automaticallay shows the current user location right. In my case i am showing another location on map ,such that the map loads the current location and zoomed to the location i have given .. but, the current location point was not showing (the blue one which comes automaticay..).
i have given mapView.showCurrentLocation=TRUE; but its not showing .
so could any one tells the way it works and it should say the current location mark and then zoomed to the point i have given.
Thanks
I have a UITabBarController that is loading a UINavigationController.
When I push a new view controller, is it possible to change the UITabBarController to a new set of tabs?