iOS different output running in simulator and on device.Keyboard dot vs. comma - xcode4.4

i want put on keyboard (.) i run simulator it ok.
But i run iphone device, i seems (,)
my .m file ;
bText.keyboardType = UIKeyboardTypeDecimalPad;
please help me
(xcode 4.4.1 + ios 5.1 + iphone 3Gs)
![enter image description here][1]

Have the same issue, might me a bug
NSRange rangeOfDash = [mediaTotal rangeOfString:#","];

Related

UIKeyboardTypeDecimalPad for currency field in 4.3 iphone sdk

I am not able to successfully use UIKeyboardTypeDecimalPad when i run on simulator 4.3 and it successfully works on simulator 5.0. I have currency to be filled in textfield.
How can i use UIKeyboardTypeDecimalPad for device running 4.3 ?
Edited
in simulator 4.3 it is giving following warning:
"Can't find keyplane that supports type 8 for keyboard iPhone-Portrait-DecimalPad; using Default"
I think it's a warning because i am using IOS 4.3 and it's printing that error in Logs and working perfectly.I am using following code
- (void)viewDidLoad
{
[super viewDidLoad];
myTextField.keyboardType=UIKeyboardTypeDecimalPad;
}
simulator autocorrection was called which crashed my app..
it is Lion 10.7.2 + Xcode 4.2 + Simulator running iOS 4.3 problem
Now solution to it is
We have to update Simulator 4.3 , by following this steps: 1) Go to Xcode->Preferences->Download 2) Update iOS 4.3 Simulator
And Reset Simulator ,and run it again... its done...

Image on UIbutton visible on simulator but lost on device

I have made an application which includes movie player in it. Video starts playing on touching PLAY button. I have set an image "Play.png" on button and while running on simulator Image shows up but on device image does not show up.. Well I checked application on iOS 4.3 simulator and installed it on device iOS 3.2. Is it because of older version ?
Thanks..
I don't think OS version matters. Just check the case of your image name and the one you are using.
Once it happened to me because of wrong case of the image name. My image name was "portraitbackground.png" and I was writing "PortraitBackground.png". Remember the simulator is running on mac os not iOS. Anyway, just check the case and write exactly what the image name is. I think .png and .PNG would also be treated as different but I haven't experienced it.
I meet an issue like this problem but a little different.
My Xcode version is 9.3. I import a third foundation in my project. In the foundation, all images are in bundle. In order to adapt my UI,I replace some pictures in the bundle,that use the same name.
But in recent days ,the foundation is update. on the last version , images name used capital letters。And On the newest version ,images name used lowercase。After update,replace images and rename images,I find that the images that renamed visible on simulator but lost on device.
After keep trying, i found that the problem was Xcode's bug. Because I rename images in Xcode just like 1.
How I rename images is in Xcode
So I rename images in finder and Shift + Command + K.

UIFont SIGABRT problem: iPhone SDK

I am using the code in my viewDidLoad:
[levelLabel setFont: [UIFont fontWithName:#"Ubuntu-Title" size:20]];
To set a font for one of my labels. I also have this font included in the project and in the 'fonts provided by application' section of -info.plist. But when the app loads it freezes and gives me a SIGABRT.
NOTE THAT THIS CODE WORKS ON THE IPHONE SIMULATOR, BUT NOT ON MY 1ST GEN IPOD TOUCH!
Is this the correct way to use custom fonts on iPhone?
You first gen iPod is running iOS 3.*, which does not support custom fonts to be loaded this way.
The font loading via info.plist is iOS 3.2 (iPad version) and higher.
To use custom font on iOS 3.* use https://github.com/zynga/FontLabel

UIModalPresentationFullScreen gives error in UniversalApplication

i am created Universal application, in that i used UIModalPresentationFull, for displaying MFMailComposerSheet in iPad, which helps me to show the full screen of a MailComposer view in landscape view of ipad. When i run the application in ipad simulator i works well. If i set it to iPhone simulator 3.0 or 3.1.3 it shows the error like "error: 'UIModalPresentationFullScreen' undeclared (first use in this function)" when i comment it and run in iPhone simulator it works what would be the solution for this error or, else is that any method replaces "UIModalPresentationFull" works in both ipad and iphone?
Thanks and regards
Venkat
UIModalPresentationFullScreen is only available in the 3.2 (and above) SDK so you can't compile it with a SDK lower than that.
However, you don't need to for a universal application - you compile it against the highest SDK you are going to run on and then you have to check at run-time if the methods / classes you are using are available. You set this in your build settings : Base SDK should be set to the highest SDK you are using (probably 3.2 for the iPad) and iPhone OS Deployment Target should be set to 3.0 - the lowest SDK on which your code can run.
You should be doing this each time you use a 3.2 only bit of code :
if ([controller respondsToSelector:#selector(setModalPresentationStyle:)])
[controller setModalPresentationStyle:UIModalPresentationFullScreen];
Then, even though you have compiled against the 3.2 SDK, when you run it on lower SDK devices, this method will not be run.
I test this on an iphone that still has 3.0 SDK on it. I don't know exactly how you would test in the simulator with a lower SDK sorry.
enter code here
Using conditional compilation block we can isolate the process for iPhone and iPad
" #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200 "
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
// The device is an iPad running iPhone 3.2 or later.
if ([picker respondsToSelector:#selector(setModalPresentationStyle:)])
{
//picker.modalPresentationStyle = UIModalPresentationFullScreen;
[picker setModalPresentationStyle:UIModalPresentationFullScreen];
}
}
" #endif "
Please remove the quotes and use that if and else part too...(i.e)conditional compilation block

iphone os 4.0 adding images to simulator 4.0 folder

i have two iphone SDK 3.0 and 4.0 on two different folders i want to add images to my iphone simulator 4.0 how could i do that the directory such as application support/media/ does not shows when selecting iphone simulator 4.0 please guide me how i could do that
Simply drag the picture you want to save on your iPhone Simulator. It will open in Safari. After that it is like on the original iPhone: Click and hold, press "Save image".
The drag and save technique doesn't seem to work for 4.0 simulator. It works fine for 3.1.2, but not 4.0. Any ideas why? I've also added the .MISC directory with .THM files.