http://stackoverflow.com/questions/1865778/iphone-app-rejected-because-of-three20-non-public-api-lineheight-and-previou

http://brettschumann.com/blog/2010/01/15/iphone-multiline-textbox-for-sms-style-chat

http://maniacdev.com/2010/07/4-ridiculously-handy-custom-ui-tricks-and-libraries/iPhone

1, register at [InAppFeedback.homepage][]

2, get your developer key from the Account page, such as: 8st3no2yrs6efg0yzcli4k23bcta492y

3, Clone the in-app-feedback(with a sample) git repository: git://github.com/appwill/InAppFeedback.git or check out from google code http://in-app-feedback.googlecode.com/svn/trunk/, locate the correspond directory(iPhone or Android), compile and run the sample to make sure there is no problem with the default setting.

4, locate the FeedbackViewController directory in that sample, copy the whole directory to your project.

5, in your project, add a button so it could navigate to in-app-feedback, include FeedbackViewController.h, you may want to create a class properties to save memory: FeedbackViewController *feedbackWebViewController; then in the correspond IBAction method, add the following code:

if (feedbackWebViewController==nil) {
self.feedbackWebViewController = [[FeedbackViewController alloc] init];
}

[self presentModalViewController:feedbackWebViewController animated:YES];

return key handle

0 推荐 收藏Handling the Return Key in a UITextView 2010-02-19
In a previous post I presented a framework for creating a data entry screen. That code focused mainly on UITextFields and allowed the user to move to the next field by tapping the Return key on the keyboard.

What if you have one or more UITextViews on your data entry screen because you want the user to be able to enter multiple lines of text? Well the UITextView handles the Return key internally and adds a new line to the text being entered, just like you would expect when you’re writing text in a text editor. And there is no equivalent of textFieldShouldReturn for UITextView.

If you don’t care about newlines in the entered text and you just want to exit the field when the Return key is tapped, then add the following method to the UITextViewDelegate:

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
BOOL shouldChangeText = YES;

if ([text isEqualToString:@"\n"]) {
// Find the next entry field
BOOL isLastField = YES;
for (UIView *view in [self entryFields]) {
if (view.tag == (textView.tag + 1)) {
[view becomeFirstResponder];
isLastField = NO;
break;
}
}
if (isLastField) {
[textView resignFirstResponder];
}

shouldChangeText = NO;
}

return shouldChangeText;
}
The shouldChangeTextInRange method is called after each keystroke is received by the UITextView, but before it’s shown on screen. If the text is a “\n” character (the Return key) then we either set first responder to the next field, or hide the keyboard in the case that this is the last field. (The entryFields method is explained in the previous post.) Return NO if a return character was detected since we don’t want the new line to show up in the UITextView, otherwise return YES and the text will be processed and shown in the UITextView as normal.

Post from iPhone Development Blog Copyright © 2009 Nick Dalton – iPhone Developer

Handling the Return Key in a UITextView



发表评论

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA image