Changing keyboard layout in UITextField causes memory leak - iphone

I have created UITextField in UITableViewCell in my app, and I receive strange memory leak with it.
When I launch my application and tap this UITextField - there is no problem with it. I can type text in English, no leaks at this moment.
But when I press globe button on a keyboard to switch to another language(for instance, Russian), I receive the memory leak in UIKeyboardInputManager, even if I don't type any text in non-english language.
Any ideas?
Tested both in simulator and iphone.

I would assume this is an issue with iOS, not even Apple is perfect. File a bug report with Apple.
http://bugreport.apple.com

Related

UIImageView from Storyboard nil on simulator

I have a quite normally wired UIImageView in a viewController in a StoryBoard. When I run the app on the iPhone it is correctly assigned in the code, while if if I run in the simulator it remains nil thus crashing the constraint trying to locate it. That would not be a big deal, were it not for the need of producing the screenshots for the iPhone 5 I do not own.
All other objects are correctly loaded also on the simulator.
The name is "appending" that I do not think is a reserved word, and I tried also to load a different image in the control with not variation.
What could it be?

Xcode font size randomly changes when testing on iPhone

I am having a problem with a UITextView when building an iPhone app using Xcode 4.6.2 where the font size on a UITextView keeps changing when testing on my iPhone.
I originally set the font size in the storyboard editor and it ran fine, the font size was 14 as expected. Later that day I looked again and the text was bigger (maybe around 20). If I click the back button and select the table cell to go back into the view sometimes it changes back to the normal size. This then keeps changing again and again whenever it wants to.
Having no luck I tried it using the viewcontroller..
In ViewController.h
#property (weak, nonatomic) IBOutlet UITextView * textfield14a;
In ViewController.m
_textfield14a.font = [UIFont systemFontOfSize:14];
Even after setting the font size with code it still changes size randomly. I have searched all over the web and I haven't seen a single article with this same problem.
Has anyone else ever had this? If yes please can you tell me if and how you solved the problem.
Any help is very much appreciated!!!
delete derived data, delete the app off of your simulator or device, clean your project, restart xcode,
if that doesn't work look at the UITextView to make sure it is set to one property or none depending on your situation, if it is a property search the the code to see anywhere if the font is changing
if not then is it a custom font? if so it could be an error with that font, if none of that works then i would need a sample project to witness the error and debug it
check this...
[textView setFont:[UIFont fontWithName:#"ArialMT" size:16]]

Cocoa Touch UITextView setText: method useless

I have a UITextView which I create in Interface Builder for an iOS app. I checked (and double checked, and triple checked) that it is properly connected to the outlet in my code. I create a property and synthesize it, and when I run NSLog(#"%#", myTextView);, it returns the UITextView's properties, not null. However, when I try calling [myTextView setText:#"My Text."];, it doesn't change anything on the view. I have found many people with similar problems like this on Stackoverflow and other places on the internet, however none of the solutions there helped me. I am using Xcode 4.0.2 on Snow Leopard. I am attempting to do this in the -viewDidLoad method. What could be causing this issue?
If you need any more information about my code setup, post a comment and I will update this post.
Are you sure the whole text view is visible on screen, and that the font color is not the same as your background?
It is very likely that the view that is displayed on the screen is not the same view as myTextView points to. Check [myTextView superview] and make sure it's onscreen. Then look and see if you've accidentally covered it with something. Change other aspects like the backgroundColor. Also, check the frame and make sure it's not CGRectZero.

displaying keyboard raises memory... but it never comes down iPhone

I encountered a weird behavior in memory just by displaying the default keyboard.
I've just created a project with an .xib file for testing purposes.
This .xib file has an UITextField element in it and it's connected in the .h via:
#property(nonatomic, retain) IBOutlet UITextField *sometext;
The .m has no changes but:
#synthesize sometext;
- (void)viewDidAppear:(BOOL)animated {
[someText becomeFirstResponder];
}
As you see it's very very simple.
The problem is that once the keyboard is shown, the memory allocated for it NEVER goes down.
I've tested this scenario in another project with the only difference of having two .xib files.
Standar pushViewController and popViewController calls are made. Instruments show an increase of 600kb in memory allocations [which are a lot more in the actual iPhone device].
All in all, hehehe. My question is:
How do I release the memory allocated for the keyboard?.
You don't. Is it a leak? If you are just looking at the Allocations, don't expect it to go back down.
EDIT:
Clarification - Object Allocations in Instruments will always go up. It won't go down. It doesn't show deallocations, just allocations...

UITextView memory leak

Can somebody can please verify that they can also reproduce that memory leak.
Create a new "Utility Application". Open the FlipsideView.xib and add a UITextview. Using the inspector, uncheck "Editable" and check "Detects Phone Number" and "Detects Links".
Run the app using the Leak instrument on an iPhone. Flip between the MainView and the FlipsideView a few times and observe the leak.
Thanks
I'm using 3.1.2
Your leak seems to be somewhere else, i tried what you say and no leaks show up when im using 3.1.2 .
However, i must add i did not connect the uitextview with IBOutlet as you did not mention it. If you are using
#property(nonatomic,retain) IBOutlet UITextView *....
it may cause a leak if you do not release your IBOutlet in dealloc.
Make sure you run Leaks against a real device, and not the simulator. I've found in the past that leaks were reported running my app against the simulator, but when I ran against a real device, those reported leaks went away.