아이폰어플개발정보2010. 10. 29. 15:17
[아이폰 앱 개발] Info button

Info button

Increase the touchable area on the Info button, so it's easier to press.
CGRect newInfoButtonRect = CGRectMake(infoButton.frame.origin.x-25, infoButton.frame.origin.y-25, infoButton.frame.size.width+50, infoButton.frame.size.height+50); [infoButton setFrame:newInfoButtonRect];

http://www.iphoneexamples.com/
Posted by 오늘마감

댓글을 달아 주세요

아이폰어플개발정보2010. 10. 12. 05:52
Info button

Info button

Increase the touchable area on the Info button, so it's easier to press.
CGRect newInfoButtonRect = CGRectMake(infoButton.frame.origin.x-25, infoButton.frame.origin.y-25, infoButton.frame.size.width+50, infoButton.frame.size.height+50); [infoButton setFrame:newInfoButtonRect];

http://www.iphoneexamples.com/

'아이폰어플개발정보' 카테고리의 다른 글

A basic UIWebView  (0) 2010.10.12
Animation: Move an object  (0) 2010.10.12
Info button  (0) 2010.10.12
UIView 높이 폭변경  (0) 2010.10.12
user와 인터렉션하는 alert 샘플  (0) 2010.10.12
테이블셀이 선택시 색상변경하는 콜백함수  (0) 2010.10.12
Posted by 오늘마감
TAG Button, Info

댓글을 달아 주세요

아이폰어플개발정보2010. 10. 12. 05:14
when textview empty, detecting it and disabling Button
In response to Victor Alexander on May 22, 2010 7:29 PM

This is what the 'delegate' property of the UITextField (or UITextView) is for. Then implement the appropriate delegate method so you get notified each time the field is changed. Then call your 'disabled' method from there.

In response to RickMaddy on May 22, 2010 11:47 PM

@RickMaddy thanks! So I'm really close... I know I'm missing something but I'm not quite sure what it is.

in my .h file I added my delegate to the view controller


UIViewController <UITextViewDelegate> 

I also added the following instance method that should tell the delegate that the text or attributes in the specified text view changed.


-(void)textViewDidChange:(UITextView *) textView1; 

In my .m file

I added a condition to the method above:


- (void) textViewDidChange:(UITextView *)textView1{      if (textView.text.length == 0) {           //disable button           moreButton.enabled = false;      }      else {           //enable button           moreButton.enabled = true;      } } 

I know that I'm missing something related to my delegate, but I'm not quite sure how to work this... even though I've read the documentation :/ Sorry to keep asking!


@property(nonatomic, assign) id<UITextViewDelegate> delegate 
In response to Victor Alexander on May 23, 2010 6:16 AM

"I'm not quite sure how to work this."

Two observations:

One, you have a typo.

You use textView1 as the parameter, and in the body of the method you use textView.

Two, connect the UITextView's delegate to you custom view controller class.

Try this:

  1. Open the view containing the UITextView.
  2. Double click on the View icon in the document window  to make sure the view is open in its editor window.
  3. Select the UITextView.
  4. Open the inspector to the Connections pane (cmd-2).

  5. Make a connection from the delegate to the File's Owner. Just click the delegate outlet and drag to the File's Owner icon the in the document window. Afte dragging you should see something like this:

  6. Save the nib file.
In response to Jeremy French on May 23, 2010 8:20 AM

Or if you are not using IB then in your view controller's 'viewDidLoad' method add the line 'textView.delegate = self'.







https://devforums.apple.com/message/223850

Posted by 오늘마감

댓글을 달아 주세요

아이폰어플개발정보2010. 10. 12. 05:13
hide the back button in BarButton of navigation bar
2

As far as I know thats correct behavior. I've had that happen every time I've hidden the back button.

Try using.


self.navigationItem.leftBarButtomItem =nil;
link|flag
Posted by 오늘마감

댓글을 달아 주세요

아이폰어플개발정보2010. 10. 12. 05:06
toolbar button enabled, disabled

/**

 Conditionally enable the Add button:

 If the location manager is generating updates, then enable the button;

 If the location manager is failing, then disable the button.

 */

- (void)locationManager:(CLLocationManager *)manager

    didUpdateToLocation:(CLLocation *)newLocation

           fromLocation:(CLLocation *)oldLocation {

    if (!self.editing) {

addButton.enabled = YES;

}

}


- (void)locationManager:(CLLocationManager *)manager

       didFailWithError:(NSError *)error {

    addButton.enabled = NO;

}

Posted by 오늘마감

댓글을 달아 주세요

아이폰어플개발정보2010. 9. 20. 16:10
hide the back button in BarButton of navigation bar
2

As far as I know thats correct behavior. I've had that happen every time I've hidden the back button.

Try using.

self.navigationItem.leftBarButtomItem =nil;
link|flag
Posted by 오늘마감

댓글을 달아 주세요