I am presenting a UIViewController as a modal viewcontroller with modalPresentationStyle = UIModalPresentationFormSheet. I have few UITextFields on its view.
My issue is that when I try to dismiss the keyboard ([textfieldname resignFirstResponder]), it doesn't do anything. However when I change the modalPresentationStyle to UIModalPresentationPageSheet, it works.
This seems to be a bug. Has any one faced similar problems and found a work around? Could I be doing anything dumb and silly?
I have made a navigation based application in my rootview controller i have put a text view when i run the app i am able to see that text view but when i navigate on other xib and comes back i am not able to see that text view if i do it programmatically by using view for header than i am able to c that text but why i am not able to do it in design time
any idea
Hello,
Is it possible to access speech recognition in an iphone app,similar to voice dialing available in iphone 3gs...when the user says something that related information needs to be fetched... Is there any particular api for the same? I have seen apps on itunes..but how to go about it?
Thanks in advance.
It is the code:
self.view.backgroundColor= [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"yourimage.png"]];
My "yourimage.png" have some space that is transparency. But it shows me it becomes black. How can I change it to show the transparency instead of black color? thz.
Hi,
ive configured local service under some app.
i wanna know how could i invoke methods on the activity, through the service in a synchronous way for example:
the service invoke a method inthe activity and waiting for for result(synchronous) from it.
(the method exists in the activity)
thanks.
I have several reference apps, and I'd like to be able to let my users "highlight" text. A reasonably good way to do this, to me, seems to be to modify the "copy/paste" contextual popup menu to add "highlight."
If there's a way to do this, I'd like to know how. If there isn't a way, suggestions would be appreciated. My text is viewed in a UIHtmlView.
I have a Class that I need to copy with the ability to make changes the value of a variable on both Classes. Simply put the classes need to remain clones of each other at all times. My understanding of the documentation is that I can do this using a shallow copy of the Class which has also been declared mutable. By shallow copying the pointer value for the variable will be cloned so that it is an exact match in both classes. So when I update the variable in the original the copy will be updated simultaneously. Is this right?
As you can see below I have used mutableCopyWithZone in the class I want to copy. I have tried both NSCopyObject and allocWithZone methods to get this to work. Although I'm able to copy the class and it appears as intended, when updating the variable it is not changing value in the copied Class.
- (id)mutableCopyWithZone:(NSZone *)zone {
//ReviewViewer *copy = NSCopyObject(self, 0, zone);
ReviewViewer *copy = [[[self class] allocWithZone:zone] init];
copy->infoTextViews = [infoTextViews copy];
return copy;
}
infoTextViews is a property declared as nonatomic, retain in the header file of the class being copied. I have also implemented the NSMutableCopying protocol accordingly.
Any help would be great.
the file that I need the users information in already has a , so Is there a way that I can get the users location coordinates without using the CLLocationManagerDelegate thing?
how does one use code to do this:
produce 15 random numbers that are not in any order, and that only occur once
eg.
1 4, 2, 5, 3, 6, 8, 7, 9, 10, 13, 12, 15, 14, 11
rand() or arc4rand() can repeat some, which is not what im after.
Thanks
I get this warning when I start debugging. Does anyone know why it's looking in /dev/null for my history.
I know it's some path which was mis-set somewhere but I do not know which?
Any help
Hi,
Whats the best way to ensure the user has entered a valid time string such as:
5:24
5.4
102:30
102.5
It will be entered into a UITextField therefore will be in a NSString.
I want to allow the user to enter the time in either hours and minutes (hh:mm) or hours and decimal minutes (hh.m).
In the hours minutes example they should be able to enter as many hours as the like but only between 0 - 59 minutes. With the hours decimal minutes I want them to only be able to enter again as many hours as the like but decimal minutes can only be 0 - 9.
Many Thanks
Hi,
ive configured local service under some app.
i wanna know how could i invoke methods on the activity, through the service while sending parameters to that method.
(the method exists in the activity)
thanks.
I've been trying to switch two views from two separate view controllers for a while and it never works, the simulator always crashes to the home screen. I'm using Xcode 3.2.5 and this is my code -
SwitchViewsViewController.h
#import <UIKit/UIKit.h>
#import "SecondViewController.h"
@interface SwitchViewsViewController : UIViewController {
}
-(IBAction)pushButton;
@end
SwitchViewsViewController.m
#import "SwitchViewsViewController.h"
#import "SecondViewController.h"
@implementation SwitchViewsViewController
-(IBAction)pushButton {
SecondViewController *screen = [[SecondViewController alloc] initWithNibName:nil bundle:nil
screen.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:screen animated:YES]
[screen release];
}
SecondViewController.h
#import <UIKit/UIKit.h>
@interface SecondViewController : UIViewController {
}
-(IBAction)pushBack;
@end
SecondViewController.m
#import "SecondViewController.h"
@implementation SecondViewController
-(IBAction)pushBack{
[self dismissModalViewControllerAnimated:YES];
}
In interface builder, all i've done is linked the file's owner classes and the buttons. Also made the SwitchViewsViewController load first, and not MainWindow. Everything builds but when I try to run the app it crashes and sends it to the home screen. Can anyone help me with this?
Hi!
I'm trying to do that for a couple of days now, and after reading tons of messages of people trying to do that too, I'm still unable to have a fully working UITextField in some of my UITableViewCells, just like in this example: http://img231.imageshack.us/img231/4858/picture4za3.png
Either I have the form working but the text is not visible (although I set its color to blue), the keyboard goes on the field when I click on it and I haven't been able to correctly implement the keyboard events.
I tried with a bunch of examples from Apple (mainly UICatalog, where there is a kinda similar control) but it's still not working correctly.
Can somebody help me (and all the people trying to realize this control) and post a simple implementation of a UITextField in a UITableViewCell, that works fine?
Thank you very much.
i'd like to record sounds played by tapping with a two dimensional array using the time and the sound id.
is there any code example anywhere?
thanx blacksheep
Hello all,
i am using an example from the iphone developer book from apress.
the problem is that this example only works on the simulator im trying to figure out how i can make it work on the device. This chapter isn't working at all. below is the sample code. data.plist is located in the resource folder.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
return [documentsDirectory stringByAppendingPathComponent:kFilename];
Below then checks to see if the file is located. this is skipped, so im guessing this does not find the file.
if ([[NSFileManager defaultManager]fileExistsAtPath:filePath]) {
NSArray *array = [[NSArray alloc] initWithContentsOfFile:filePath];
BGDataSave = [array objectAtIndex:0];
NSLog(@"%@", BGDataSave);
price.text = [array objectAtIndex:1];
percent.text = [array objectAtIndex:2];
salepriceLabel.text = [array objectAtIndex:3];
origpriceLabel.text = [array objectAtIndex:4];
}
Hi there,
I wonder if it is possible to build iphone-wireless' stumbler app with Apple XCode or it is necessary to use alternative arm-apple-darwin environment to build it.
thanks
All,
Has anyone figured out how to return the sql for an object that is in Webi using the rebean api? I have got the ReportExpression of the column but, from there I am having a difficult time retrieving the SQL of the object.
Thanks
Hi,
I have a view that I want to extend on the left side using an animation. All borders but the left one should remain the same, so the x position and the width of the view are changing.
I use this code:
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:5.0];
self.frame = CGRectMake(self.frame.origin.x-100,
self.frame.origin.y,
self.frame.size.width+100,
self.frame.size.height);
[UIView commitAnimations];
If I run this code, the width of the view is set to the new value immediately and then the view is moved to the new x point, but why? How can I change this behaviour?
Thanks for your ideas!
Hi,
I'm trying to use this fairly standard line of code in my app:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
But am receiving the follow error:
error: invalid conversion from 'int' to 'UIRemoteNotificationType'
It works if I only use one of the notification types but fails every time if I try and use more than one. Any ideas what I'm doing wrong?
hi friends...
how can i get the bounds of a row in a cell in a grouped table..My intention is to adjust the table view whenever the keyboard pops up.
wat i have is a groupedtable with each cell having a textfield as subview of its contentview.. how can i get the bounds of the row in a cell, whenever user taps on a particular textfield. i need the bounds of the row so that i can adjust the view whenever keyboard pops up. Pls help me to find a solution. i am new to iphone development.