#import "UIImageEffects.h"
....
UIImage *blurdImage=[UIImageEffects imageByApplyingLightEffectToImage:[UIImage imageNamed:@"sample.png"]];
Apple Sample code with UIImageEffects classes
#import "UIImageEffects.h"
....
UIImage *blurdImage=[UIImageEffects imageByApplyingLightEffectToImage:[UIImage imageNamed:@"sample.png"]];
Apple Sample code with UIImageEffects classes
-(void) setMaskTo:(UIView*)view byRoundingCorners:(UIRectCorner)corners withRadius:(CGFloat)radius;
{
UIBezierPath* rounded = [UIBezierPath bezierPathWithRoundedRect:view.bounds byRoundingCorners:corners cornerRadii:CGSizeMake(radius, radius)];
CAShapeLayer* shape = [[CAShapeLayer alloc] init];
[shape setPath:rounded.CGPath];
view.layer.mask = shape;
}
// function Call[self setMaskTo:view1 byRoundingCorners:UIRectCornerTopLeft|UIRectCornerBottomLeft withRadius:20.0];
myView.alpha=0;
[mySuperView addSubview:myView];
[UIView animateWithDuration:0.2
animations:^{myView.alpha = 1.0;}
completion:nil];
[UIView animateWithDuration:0.2
animations:^{view.alpha = 0.0;}
completion:^(BOOL finished){ [view removeFromSuperview]; }];
if ([UIReferenceLibraryViewController dictionaryHasDefinitionForTerm:word.text]) {
UIReferenceLibraryViewController* ref =
[[UIReferenceLibraryViewController alloc] initWithTerm:word.text];
[self presentViewController:ref animated:YES completion:nil];
}else{
NSLog(@"No definition found");
}
[webView stringByEvaluatingJavaScriptFromString:@"var range = window.getSelection().getRangeAt(0);"
@"var selectionContents = range.extractContents();"
@"var span = document.createElement('span');"
@"span.style.backgroundColor = 'yellow';"
@"span.appendChild(selectionContents);"
@"range.insertNode(span)" ];
- (NSArray*)shuffleArray:(NSArray*)array {
NSMutableArray *temp = [[NSMutableArray alloc] initWithArray:array];
for(NSUInteger i = [array count]; i > 1; i--) {
NSUInteger j = arc4random_uniform(i);
[temp exchangeObjectAtIndex:i-1 withObjectAtIndex:j];
}
return [NSArray arrayWithArray:temp];
}
Reference