Tuesday 26 November 2013

How to create the Test User apple developer account to test the InApp purchase concept

Hi,

  Follow the below link and follow the steps they have mentioned

https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/7_ManagingYourTeam/ManagingYourTeam.html

Friday 22 November 2013

How to declare a variable which we need to use inside a block?

You must use the __block specifier when you modify a variable inside a block, so change your code to this:
 __block NSString *textString;
 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 
                                                 (unsigned long)NULL), ^(void) {
      textString = [self getTextString];
});
Blocks capture the state of the variables declared inside, so we must declare that the variable is mutable. And mutability is exactly what you need considering that you're essentially setting this thing.

Wednesday 20 November 2013

Customise the UITextField clearButton colour:




change the color of a UITextField clearButton:




CGFloat myWidth = 25.0f;
    CGFloat myHeight = 25.0f;
    UIButton *myButton = [[UIButton alloc] initWithFrame:CGRectMake(0.0f, 0.0f, myWidth, myHeight)];
    [myButton setImage:[UIImage imageNamed:@"close"] forState:UIControlStateNormal];
    [myButton setImage:[UIImage imageNamed:@"close"] forState:UIControlStateHighlighted];
    
    [myButton addTarget:self action:@selector(doClear:) forControlEvents:UIControlEventTouchUpInside];
    
    myTextField.rightView = myButton;
    myTextField.rightViewMode = UITextFieldViewModeUnlessEditing;

Tuesday 19 November 2013

Change UITextField’s placeholder color without subclassing it


Change UITextField’s placeholder color without subclassing it

The safe way to customize UITextField’s placeholder is subclassing theUITextField and overriding placeholderRectForBounds:, Apple won’t bother you on this one. However, if you want to take the risk, you can try this way:

[self.MyTextField  setValue: [UIColor darkGrayColor]  
                                 forKeyPath: @"_placeholderLabel.textColor"];

Thanks 
R.Anusha