I currently have this workflow in a tab based app:
Tab1 loads...
ViewOne : UIViewController
>>
PickerView : UIViewController
>>
DetailView : UIViewController
"" means loads based on user action. I'd like navigation bars on PickerView and DetailView. PickerView just needs a cancel button in the top left of its nav bar. DetailView needs the normal navbar back button. I already have PickerView's nav bar wired up through IB and working. I'm not sure what to do with PickerView's nav bar.
PickerView is also loaded from Tab2, who's main view starts as a UINavigationController. PickerView's nav bar works fine in that case.
ViewOne should not have a navigation bar.
Any ideas?
So I created my iPad app and submitted it to the store, the app is called photogoo. I now have the iPad and I am finding that it is not possible to browse to the app in any way, confirmed by the zero downloads from yesterday. It is only possible to find by searching.. I also noticed that the apps in entertainment were being listed alphabetically and stopped at "F"
Am I really being excluded because my app starts with the letter "P" or is it possible there is some reason that I am not being listed under "all apps"?
hi All Guy,
I'm new member of iPhone programming. i want to write app with CoreLocation and Mapkit API.
I found and added pin to current location. So far, i want to draw the circle around my location, but i didn't do that.
I'm waiting the helping from all of you.
Thanks a lot!
SinhNguyen
Hello everyone,
I am experiencing a problem with accessing an application from the Android-browser.
The application uses DWR to persist connections to the clients that are connected with it.
Everything works fine for me, except that if the application does not send any data to the client on the Android-phone for 2 minutes, the connection seems to be lost and no data arrive at the client. The same scenario works just fine on Firefox, Opera and Chrome. If the pause between two data transfers is less than 2 minutes, it works just fine.
So, now my question:
Is there some timeout setting for the android browser that I am missing? Or is this some built-in bug/feature/whatever that I cannot circumvent?
I know that I could prevent this from happening with some sort of heartbeat, I would just like to why this is happening.
Thanks in advance, Max
btw: Everything (server, clients) runs on my machine and I am testing this on the android emulator with Windows XP
Android emulator version 1.10 (build_id CUPCAKE-150240)
When I add libiphone-exif.a to snapandrun in objectiveflickr I get this error:
".objc_class_name_EXFJpeg", referenced from:
literal-pointer@__OBJC@__cls_refs@EXFJpeg in SnapAndRunViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I do not know what this means, I follow the guide to add it, add all of the .h files and the libiphone-exif.a
Is there something special I have to do?
Hi, I am trying to create an item list, diffrent for each i and j variable. My code is:
if (i == 0) {
if (j == 0) {
final CharSequence[] items = {"4:45", "5:00"}
} else if (j == 1) {
final CharSequence[] items = {"4:43", "4:58"}
} else if (j == 2) {
final CharSequence[] items = {"4:41", "4:56"}
} else {
final CharSequence[] items = {"4:38", "4:53"}
}
...
new AlertDialog.Builder(this)
.setTitle("Hours")
.setItems(items,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialoginterface, int i) {
// getStation(i);
}
})
.show();
}
I get an error in the line .setItems(items,:
items cannot be resolved
I think that the compiler thinks that the CharSequence[] items may not be initialised or something...
How can I make this programme run?
HI all,
I am having a 2 textFeild and 1 textview.
out of 2 textfeild,one textfield requires number to be filled in there.
so for that i hv provided numeric keyboard.
i m not able to dismiss numeric keyboard,since i cant c any option to hit the numeric keyboard dismiss.
is it possible to dismiss numeric keyboard
??
if yes than can anyone guide me through.
regards
shishir
I got very frustrated when I realized that android is not able to display pdfs (in a webview or whatever) out-of-the-box.
So my question, are there any (os) jars or classes to display a pdf document within an app?
Thx in advance,
alex
Hi All,
Hope to get solution to this problem. I have been stuck on it since a long time now.
I have a a tableView which has custom labels drawn upon the cell using CGRect. I receive the data from a web service in arrays. Initially i display a line of data on the cells. When the user selects a cell, I call reloadsRowAtIndexPath to increase the height of selected row. In the process, cellForRowAtIndexPath gets called again. I keep track of this by a flag, and when cellForRowAtIndexPath gets called again, I display the two more lines of data from arrays, on the cell.
What i am getting is all overlapping data on one other. I tried to remove already placed labels in didSelectRowAtIndexPath, but to no avail.
Please help me on this
Thanks in advance.
I'm interested in learning Objective C for iPhone development. This is a topic which I realize has been covered to death. The qualifying difference is: I'd like to start learning beginning with the latest version (the most recent iPhone OS as of May, 2010 is ver. 3.2 and 4 beta is also out). I'd like to not have to wade through or unlearn legacy information.
Using the links I've found throughout related topics on Stack Overflow, I'll read a blog post or tutorial which will say one thing, but then the comments will say, "this is different now in version xyz." For example, I've found this a few times regarding memory management/garbage collection.
I assume that Apple's "getting started" doc.s will have the most recent info but many SO posts have said that those are not the most clear.
The Stanford iPhone course looks great, but how do I know if it still applies to the most recent versions?
Where should one start learning Objective C for iPhone development starting with version 3.2 or later without having as much exposure to legacy information?
I want to wait for latitude.text and longtitude.text to be filled in before sending a tweet, this code works fine, but I would rather not put the tweeting part in locationManager because I also want to sometimes update the current location without sending a tweet. How can I make sure the txt gets filled in before sending the tweet without doing this?
- (IBAction)update {
latitude.text =@"";
longitude.text =@"";
locmanager = [[CLLocationManager alloc] init];
[locmanager setDelegate:self];
[locmanager setDesiredAccuracy:kCLLocationAccuracyBest];
[locmanager startUpdatingLocation];
}
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
CLLocationCoordinate2D location = [newLocation coordinate];
latitude.text = [NSString stringWithFormat: @"%f", location.latitude];
longitude.text = [NSString stringWithFormat: @"%f", location.longitude];
TwitterRequest * t = [[TwitterRequest alloc] init];
t.username = @"****";
t.password = @"****";
[twitterMessageText resignFirstResponder];
loadingActionSheet = [[UIActionSheet alloc] initWithTitle:@"Posting To Twitter..." delegate:nil cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];
[loadingActionSheet showInView:self.view];
[t statuses_update:twitterMessageText.text andLat:latitude.text andLong:longitude.text delegate:self requestSelector:@selector(status_updateCallback:)];
twitterMessageText.text=@"";
}
Hi!
I was wondering if I can deallocate the depth buffer in iPhone OpenGL ES to conserve memory? Or it stays until the application finishes?
I only need the depth testing in the beginning of the application.
I have'nt plunged into Android Development as yet though Java Classes C++ all that is not new to me. Here are the questions folks. Appreciated any help on these : -
If I need to develop test and deploy Android Apps do I NEED AN ANDROID Hardware device or is there a software Android Simulator like VMWARE or Virtual PC , where I can emulate the results.If there is such can you point me more info
I have a Netbook ( the Chinese Ipad Clone ) running Android that has only Wi-Fi for the present. Is it possible to add the following features via the spare USB Port
--- a USB Based 56K Modem : Are there Android platform H/W Drivers.
--- a USB based RJ45 ( Ethernet LAN LandLine connection ) Adapter :Are there Android platform H/W Drivers.
Please advise
Thanks
Saul
In my viewForAnnotation delegate, I create a MKAnnotationView with leftCalloutaccessory as a info button. When the info button is tapped, I want to replace it with a UIActivityIndicator. So in the calloutAccessoryTapped delegate, I wrote
view.leftCalloutaccessoryView = [UIActivityIndicator indicatorWithStyle:UIActivityIndicatorWhite];
The callout accessory seems to change, but it seems like the view doesn't get updated immediately.
That's when the callout accessory gets hidden (by tapping another pin) and is re-opened, I see a spinner. But otherwise, I don't.
I tried calling [view setNeedsdisplay] and [view setNeedsLayout] and [view layoutsubviews] as well but in vain.
Any suggestions/pointers?
I have some data like this :
1, 111, 2, 333, 45, 67, 322, 4445
NSArray *array = [[myData allKeys]sortedArrayUsingSelector: @selector(compare:)];
If I run this code, it sorted like this:
1, 111, 2,322, 333, 4445, 45, 67,
but I actually want this:
1, 2, 45, 67, 111, 322, 333, 4445
How can I implement it? thz u.
Hello.
I have created new a view controller in my project (ActivateController). I have added it to the interface of the parent view controller (PrefsViewController):
#import <UIKit/UIKit.h>
#import "ActivateController.h"
@interface PrefsViewController : UIViewController <UITextFieldDelegate> {
ActivateController *activateController;
}
-(IBAction)pressedActivate;
@property(nonatomic,retain) IBOutlet ActivateController *activateController;
@end
I have also added it to parent's controller nib (and changed it type to ActivateController), and connected it to IBOutlet ActivateController.
But still, when I perform (on pressedActivate):
[self.navigationController pushViewController:activateController animated:YES];
Nothing happens. I have done it successfully many times before. What might be wrong?
P.S. pressedActivate is executed for sure (I used NSLog to check).
Hi,
Sorry for long winded post.
I am trying to understand UIScrollView and running into very simple problem.
I am creating a scroll view
I am making this view 1.5 size larger then normal size
Using UIScrollView I expect to see some edge elements of view out of bounds, but should be able to pan the view therefore bringing missing elements back to the visible area.
However I am seeing that I can't just pan/scroll view anyway I want, instead view always wants to scroll up, as soon as move away my finger from the screen (touch end event).
I am not handling any touches, etc - I just want to understand why does not scaled view stay put where I scroll it?
CGRect viewFrame = self.view.frame ;
viewFrame.size.width *= 1.5;
viewFrame.size.height *= 1.5;
CGSize mySize = viewFrame.size;
[ ((UIScrollView *) self.view) setContentSize: mySize];
self.view.transform = CGAffineTransformMakeScale(1.5, 1.5);
What I really trying to accomplish is something similar to Number on iPad (the same code will work on iPhone):
There is a view with lots of controls
on it (order entry form)
User can zoom into the entire form so all elements look bigger
user can pan the form therefore bringing various elements into the visible area of the screen.
It seems that UIScrollView can should be able to handle zoom and pan actions (for now I am using Affine Transform to zoom in to the order entry form and iPad)
Thanks
Is it possible to stop all started services when the user hits the Home Button?
I use:
startService(new Intent(ClassName.this, ClassName2.class));
stopService(new Intent(ClassName.this, ClassName2.class));
This means I will have to somehow add the 'stopService()' for 7+ of my app classes
I've researched this topic and I think there's 'onTerminate' but still not sure how this should be implemented.
Any help or hints would be appreciated!
Thanks!
Hi
I made a plist that looks like that:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList 1.0.dtd">
<plist version="1.0">
<array>
<array>
<dict>
<key>Company</key>
<string>xxx</string>
<key>Title</key>
<string>VP Marketing</string>
<key>Name</key>
<string>Alon ddfr</string>
</dict>
<dict>
<key>Name</key>
<string>Adam Ben Shushan</string>
<key>Title</key>
<string>CEO</string>
<key>Company</key>
<string>Shushan ltd.</string>
</dict>
</array>
<array>
<dict>
<key>Company</key>
<string>xxx</string>
<key>Title</key>
<string>CTO</string>
<key>Name</key>
<string>Boaz frf</string>
</dict>
</array>
</array>
</plist>
Now I want to extract the data like that (all the 'A' for key "Name" to one section and all the 'B' "Name" to other one):
NSString *plistpath = [[NSBundle mainBundle] pathForResource:@"PeopleData" ofType:@"plist"];
NSMutableArray *attendees = [[NSMutableArray alloc] initWithContentsOfFile:plistpath];
listOfPeople = [[NSMutableArray alloc] init];//Add items
NSDictionary *indexADict = [NSDictionary dictionaryWithObject:[[attendees objectAtIndex:0] objectForKey:@"Name"] forKey:@"Profiles"];
NSDictionary *indexBDict = [NSDictionary dictionaryWithObject:[[attendees objectAtIndex:1] objectForKey:@"Name"] forKey:@"Profiles"];
[listOfPeople addObject:indexADict];
[listOfPeople addObject:indexBDict];
This in order to view them in sectioned tableView.
I know that the problem is here:
NSDictionary *indexADict = [NSDictionary dictionaryWithObject:[[attendees objectAtIndex:0] objectForKey:@"Name"] forKey:@"Profiles"];
But I just can't figure how to do it right.
Thanks.
I hoping to create a custom Settings view, similar to the Settings application, but with more control over the UI and access to some settings (i need to lock some of the settings).
Obvously, there are a variety of UI elements mixed in each row of application's UITableView. For example, the 'Airplane Mode' setting shows a UISwitch, while the 'Wi-Fi' setting has a text value adjacent to the disclosure symbol (''). Further complicating matters, is the grouping of these settings.
I have some general questions about the approach I should take:
Seems like i need to save the name of the setting, its current value, its grouping, and the type of UI element(s) needed to modify its value. i would like to make use [NSUserDefault standardUserDefaults], but not have these settings appear in the Settings application. I'm guessing that I will need to create my own settings-persistence class.
is it better to build each one of these complex UI-element combinations in code or to create a series of custom views based on the UITableViewCell and load the appropriate one? i'm guessing the latter.
some of the setting require that i load another view to select its value. assuming that the application is based on the Utility pattern, should the SettingsView manage the navigation stack, rather than having the app delegate do so?
Thanks for your time and comments.
Craig Buchanan
I have a view that shows a MPMoviePlayerViewController modally. When testing it in the iPad simulator it works well on the first try. If I dismiss the video and then show the view again, the player only plays the audio, but not the video.
Is this a simulator quirk or am I doing something wrong? Here's my code:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
MPMoviePlayerViewController* v = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
[[NSNotificationCenter defaultCenter] addObserver:self selector: @selector(playbackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:v.moviePlayer];
[self presentMoviePlayerViewControllerAnimated:v];
[v release];
}
-(void) playbackDidFinish:(NSNotification*)aNotification
{
MPMoviePlayerController *player = [aNotification object];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:player];
[player stop];
[self dismissMoviePlayerViewControllerAnimated];
}
Hi all!
I have a UIScrollView in my project. I have a view controller I would like to add as a child of the UIScrollview. Would I just do that like this:
[scrollView addSubview:theViewController.view];
or is there a better way?
(theView is a view, not the TV show)
Furthermore, I would like to be able to use a UIButton in scrollView's parent view controller to toggle whether or not the user is scrolling with scrollView and NOT interacting with theView or NOT scrolling with scrollview and interacting with theView. Should I just have that set the property:
scrollView.userInteractionEnabled = NO;
or would that disable interaction with theView because it's a child?
Thanks for your help!
Hi All,
I have created a static library following this link.
But I am facing Problems in using the library. For reference on how to use static libraries in an iPhone project I followed this link .
But I am stil struggling with the "How to implement static libraries in any other iPhone project?" question.
Thank you all.