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.
Hi, I'm an iPhone developer, now I'm developing a game and I just found about the iPhone 2.2 being able to reproduce video on a TV Screen trhough MPTVOutWindow class. After googling I've found a lot of blogs with the News, however none of them give any information on the class,
what should I do to implement the class in order to display ouput on the TV?
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,
I am looking for some stock symbol look-up API. I could able to query yahoo finance with a symbol & could able to retrieve the stock price & other details.
I am looking for some auto-complete stock look-up API like if i query fo "Go*" ... how can i get all stock symbols starting with GO* = Goog etc ... is there any APi for wildcard stock symbol searches
Any help would be great ..
Thanks
Hello, I'm trying to pass the user on to the interface based on their cell selection in the UITableView, ie, if the user selects cell 1, they are taken to view model 2, containing UIWebView. UIWebView then displays local file, cell1.html.
Currently, I've manage to get placeholder using:
selectedCellText.text = selectedCell;
to display the name of the cell selected. How do I get it to directly pass to the UIWebView, stick UIWebView in the interface and link it using:
UIWebView *myWebView = [[UIWebView alloc] initWithFrame:frame];
NSBundle *mainBundle = [NSBundle mainBundle];
NSString *stringUrl = [mainBundle pathForResource:@"selectedCell" ofType:@"html"];
NSURL *baseUrl = [NSURL fileURLWithPath:stringUrl];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:baseUrl];
[myWebView loadRequest:urlRequest];
My other issue is that some of the cell names have spaces in them, and for simplicity, I'd like to ensure that there are no spaces (actually, will it even work with spaces in the name, I assume with %20 ?
Thanks
I have spent ages trying to figure this out and I am still having problems. I want to rotate an image a random number of time - say 5 and a bit - then have it stop. I then want to rotate it again FROM ITS STOPPED POSITION. I am having difficulty with this so maybe someone can advise me on the right way to do it.
Ok so I am using a CABasicAnimation for the spin like this...
CABasicAnimation* rotationAnimation;
rotationAnimation = [NSNumber numberWithFloat: 0.0];
rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI * 1.0];
rotationAnimation.duration = 100;
rotationAnimation.cumulative = YES;
rotationAnimation.repeatCount = 5.2;
rotationAnimation.removedOnCompletion = NO;
rotationAnimation.fillMode = kCAFillModeForwards;
[myView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
This works fine. I use a animationDidStop function to transform the image to the new angle so that it actually in the new position (not just appearing that way).
This is where my problems start. I have tried the following...
removing the toValue line which means the animation starts from where it currently is but when the animation block is repeated it jumps back to this start position every time the block is run
storing the value of the end rotation and using this in the toValue so the 2 lines of code become...
rotationAnimation = [NSNumber numberWithFloat: previousVal];
rotationAnimation.toValue = [NSNumber numberWithFloat: (M_PI * 1.0)+previousVal];
when I do this the animation still jumps because it is flicking back to the previousVal everytime the block is repeated
Therefore my final thought is to check to see if the image is at zero, if not then rotate it to zero, then impliment the block of code to spin multiple times. This seems complicated but is this the ONLY way to achieve this? I am concerned about getting the timings smooth with this method.
Any suggestions would be amazing! Thanks
Hello!
This is driving me nuts.
I have a TableView with custom cells. My cell contains a editble textview. Is it possible to change rowheight on cell and textview dynamicly (when I editing the textView) ?
best regards
I'd like to add a custom UIToolbar to my UIViewController. In Interface Builder I add the uitoolbar at the top of my view, and it looks just fine. However, when I run the app in the Simulator it gets hidden by the default iphone bar (this one with the clock, battery status, etc.).
Here you can see how it looks like:
Any ideas?
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 Guys,
I can I make motionEnded work in one of my viewController inside the tabbarcontroller.
-(BOOL)canBecomeFirstResponder
{
return YES;
}
In viewDidLoad I got
[self becomeFirstResponder];
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (motion == UIEventSubtypeMotionShake )
{
NSLog(@"motioned");
}
}
Hi everyne,
I am using mgtwitterEngine to integrate twitter functionality.In my application i want response in XML format so i have done all the changes as metion in readme of mgtwiiter
for example i have done #define YAJL_AVAILABLE 0 in MGTwitterEngineGlobalHeader.h and
define USE_LIBXML 1 in MGTwitterEngine.m file and i am checking that API_FORMAT is xml too but whenever i am getting response i am getting in json format.
Please can any one tell me what am i missing? any help would be appreciated.
Thaks
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)
I am using a predicate to find an object in core data. I can successfully find the object that I want, but I need to also get the indexPath of that object, so that I can push a details view in for that object. Currently I have the following code for getting my object:
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
[fetchRequest setEntity:[NSEntityDescription entityForName:@"Ride" inManagedObjectContext:self.managedObjectContext]];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"title = %@ AND addressFull = %@", view.annotation.title, view.annotation.subtitle];
[fetchRequest setPredicate:predicate];
NSMutableArray *sortDescriptors = [NSMutableArray array];
[sortDescriptors addObject:[[[NSSortDescriptor alloc] initWithKey:@"title" ascending:YES] autorelease]];
[sortDescriptors addObject:[[[NSSortDescriptor alloc] initWithKey:@"addressFull" ascending:YES] autorelease]];
[fetchRequest setSortDescriptors:sortDescriptors];
[fetchRequest setReturnsObjectsAsFaults:NO];
[fetchRequest setPropertiesToFetch:[NSArray arrayWithObjects:@"title", @"addressFull", nil]];
NSError *error = nil;
NSArray *fetchedItems = [self.managedObjectContext executeFetchRequest:fetchRequest error:&error];
// Sohow what record we returned
NSLog(@"%@",[fetchedItems objectAtIndex:0]);
So, I can correctly get my object into an array. But how do I translate that object into an indexPath?
I have been looking everywhere how to play a $#@&! rington/alarm sound in android.
I press a button and I want to play a rington/alarm sound. I could not find a easy, strsight forward sample... YES! I already looked at Alarm clock source code... but it is not straight forward and I cannot compile it neither.
I cannot make this work:
Uri alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setDataSource(this, alert);
final AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
if (audioManager.getStreamVolume(AudioManager.STREAM_ALARM) != 0) {
player.setAudioStreamType(AudioManager.STREAM_ALARM);
player.setLooping(true);
player.prepare();
player.start();
}
I get this error
04-11 17:15:27.638: ERROR/MediaPlayerService(30): Couldn't open fd for content://settings/system/ringtone
So.. please if somebody knows how to play a default rington/alarm let me know.
I prefer not to upload any file. Just play a default rington.
Thanks,
Federico
hiiii,
is it possible to clear notification programatically???
if it is possible plz help me
i tried with NotificationManager but its not working
is thr any other way i can do it??????????
thanks
Hello I am having trouble compiling a static library for the iPhone. It worked in the past.
It keeps saying "target specifies 'com.apple.product-type.tool' but there is no such product for the 'iphoneos' platform. I have rechecked the static compilation flag.
hi all,
i still have a problem to develop a convenient app to the user. because i am struggling using the activities, intent and intent filters. www.developer.android.com/reference not fit for me to understand these things. can you suggest me a fine example code or tutorial to understand how these things are getting worked.
I need to union two sets of XElements into a single, unique set of elements. Using the .Union() extension method, I just get a "union all" instead of a union. Am I missing something?
var elements = xDocument.Descendants(w + "sdt")
.Union(otherDocument.Descendants(w + "sdt")
.Select(sdt =>
new XElement(
sdt.Element(w + "sdtPr")
.Element(w + "tag")
.Attribute(w + "val").Value,
GetTextFromContentControl(sdt).Trim())
)
);
Supposing we have an Xcode iPhone project with 2 targets, is it possible to build and install both of them on the device with one click? Of course, I understand we will not be able to "build and run" both, but can we at least install them?
And to extend this concept a bit a bit: are there any scripts to achieve the same thing but with multiple iPhone projects instead of multiple targets in one project? This would be useful when you want to load all your apps on a new development device and don't want to go through all your projects one by one and install.
Hi,
Is there a way to disable the Javascript in a UIwebView ?
I have memory consumption problem, and I'm looking for a trick here because it seems to not be be possible with the official stuff.
Maybe a call with javascript can stop javascript itself, i don't know.
Thanks in advance for any help,
Adrian C
Imagine you have a normal table view where each row is an item on a conveyor belt. You will put the items in each cell of the table view but when you scroll you also want the background image (the conveyor belt) to scroll as well. How can you do this?
I write custom jabber client in iphone.
I use xmppframework as engine.
And I have UITableViewController with NSMutableArray for repesent contact list.
When i receive(or somebody change it contents) roster (aka contact list) i wanna change UITableView items (add/remove/modify). So if User work with listView at time when list updates by
[items addObject:newItem];
[self.tableView reloadData];
user lost current selection item.
So, my question is howto save (if possible, i mean if given selected item not removed) current select item after reloadData?
Thx.
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!