Monday 7 December 2015

Fix didselct and Tap Gesture conflict.

#pragma mark UIGestureRecognizerDelegate methods

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
    if ([touch.view isDescendantOfView:someCollectionview]) {
        return NO;
    }
    return YES;
}

Monday 23 November 2015

User name with alphanumeric and underscore characters only check.

+ (BOOL)usernameCheck:(NSString *)string{

    NSCharacterSet *characterSet = [NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_"];
    characterSet = [characterSet invertedSet];
    NSRange range = [string rangeOfCharacterFromSet:characterSet];
    if (range.location != NSNotFound) {
        return NO;
    }
    return YES;
}

Wednesday 28 October 2015

Stop embedded Youtube player on UIwebview

-(void)viewDidDisappear:(BOOL)animated{
    [super viewDidDisappear:animated];
    if (self.isMovingFromParentViewController) {
        [youTubeWebView loadHTMLString:@"<p></p>" baseURL:nil];
    }
}

Wednesday 14 October 2015

Custom AlertView

PXAlertView is a UIAlertView replacement similar to the style in iOS 7 but with a block based API and the ability to customise the styling and add custom views.https://github.com/alexanderjarvis/PXAlertView

Monday 5 October 2015

Transport Security iOS 9 WORKAROUND!

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>