├── .gitignore ├── README.md └── iOS7StyleMaskTransparency ├── Classes ├── NickTitleStackBlurVC.h ├── NickTitleStackBlurVC.m ├── UIImage+StackBlur.h ├── UIImage+StackBlur.m ├── stackBlurAppDelegate.h └── stackBlurAppDelegate.m ├── MainWindow.xib ├── NickTitleStackBlurVC.xib ├── Resources ├── angrycat.png ├── mask.png └── miniMask.png ├── StackBlur_README ├── iOS7StyleMaskTransparency-Info.plist ├── iOS7StyleMaskTransparency.xcodeproj └── project.pbxproj ├── iOS7StyleMaskTransparency_Prefix.pch └── main.m /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | iOS7-Trans-Blur 2 | =============== 3 | 4 | ###Tap the image/ pull the slider to move the translucent layer # 5 | ###(It's a star on the image of my cat below)### 6 | 7 | ![Image](http://i.imgur.com/5KoXuCS.png&raw=true) 8 | ![Image](http://i.imgur.com/m4ksCKo.png&raw=true) 9 | 10 | Implementation of the new iOS7-style masking transparency blur, using StackBlur 11 | 12 | First off, big thanks to tomsoft1 for the iOS implementation of [StackBlur](https://github.com/tomsoft1/StackBluriOS). 13 | I used this as my base, with manual animation and masking, to produce high quality masking blur similar to what you see in the new iOS. 14 | 15 | Ironically this was made months and months ago for a project which never took off, but I'm sure people are looking for something similar right about now! 16 | 17 | Enjoy, and feel free to email and fix anything I'm screwing up! 18 | 19 | *This software is provided without any warantee or guarantees of any sort. If you use this library in your works, I only ask that you provide a link to this github repo so others can find it too!* 20 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/Classes/NickTitleStackBlurVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // NickTitleStackBlurVC 3 | // iOS7StyleMaskTransparency 4 | 5 | #import 6 | 7 | @interface NickTitleStackBlurVC : UIViewController { 8 | IBOutlet UIImageView *imagePreview; 9 | UIImage *source; 10 | } 11 | 12 | @property (nonatomic, retain) UIView *maskHolder; 13 | @property (nonatomic, retain) UIImageView *maskView; 14 | @property (nonatomic, retain) UIImageView *normalView; 15 | @property (nonatomic, retain) UIImageView *blurView; 16 | @property (nonatomic, retain) UIImageView *overlayView; 17 | 18 | @property (nonatomic, retain) UIImage *blurImage; 19 | 20 | - (IBAction) sliderChanged:(id)sender; 21 | 22 | 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/Classes/NickTitleStackBlurVC.m: -------------------------------------------------------------------------------- 1 | #import "NickTitleStackBlurVC.h" 2 | #import "UIImage+StackBlur.h" 3 | #import 4 | 5 | @implementation NickTitleStackBlurVC 6 | 7 | @synthesize maskHolder; 8 | @synthesize maskView; 9 | @synthesize normalView; 10 | @synthesize blurView; 11 | @synthesize overlayView; 12 | @synthesize blurImage; 13 | 14 | double currVal; 15 | BOOL isBlurred; 16 | 17 | enum { 18 | out = 0, 19 | in = 1 20 | }; 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | source=[UIImage imageNamed:@"angrycat.png"]; 25 | currVal = 0; 26 | isBlurred = 1; 27 | 28 | //******************************************************* 29 | 30 | // COMMENT OUT ANY OF THE FOLLOWING VIEWS TO GET A LOOK AT WHAT EACH ONE DOES 31 | 32 | //******************************************************* 33 | 34 | //This view holds the mask itself - set the image to be whatever shape mask you want 35 | maskHolder = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)]; 36 | [maskHolder setBackgroundColor:[UIColor whiteColor]]; 37 | maskView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)]; 38 | [maskView setContentMode:UIViewContentModeScaleToFill]; 39 | [maskView setImage:[UIImage imageNamed:@"mask.png"]]; 40 | [maskView setCenter:CGPointMake(320, maskView.center.y)]; 41 | [maskHolder addSubview:maskView]; 42 | 43 | //This view holds the non-blurred portion of the original image 44 | normalView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height-100)]; 45 | [normalView setImage:source]; 46 | [normalView setContentMode:UIViewContentModeScaleAspectFill]; 47 | [self.view addSubview:normalView]; 48 | 49 | //This view creates the blurred view from the underlying source 50 | blurView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height-100)]; 51 | [overlayView setImage:source]; 52 | [overlayView setContentMode:UIViewContentModeScaleAspectFill]; 53 | blurImage = [UIImage new]; 54 | blurImage = [source stackBlur:15]; 55 | [blurView setImage:blurImage]; 56 | 57 | //This view contains the masked/blurred portion of the image 58 | overlayView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height-100)]; 59 | [overlayView setImage:source]; 60 | [overlayView setContentMode:UIViewContentModeScaleAspectFill]; 61 | [self.view addSubview:overlayView]; 62 | 63 | //This lets you tap the screen for automatic animation 64 | UITapGestureRecognizer *simpleTap = [UITapGestureRecognizer new]; 65 | [simpleTap addTarget:self action:@selector(runAnimate)]; 66 | [overlayView addGestureRecognizer:simpleTap]; 67 | [overlayView setUserInteractionEnabled:TRUE]; 68 | } 69 | 70 | - (void)didReceiveMemoryWarning { 71 | // Releases the view if it doesn't have a superview. 72 | [super didReceiveMemoryWarning]; 73 | 74 | // Release any cached data, images, etc that aren't in use. 75 | } 76 | 77 | - (void)viewDidUnload { 78 | // Release any retained subviews of the main view. 79 | // e.g. self.myOutlet = nil; 80 | } 81 | 82 | //******************************************************* 83 | 84 | // Where the image is set for overlay view, it grabs the blurred version of the underlying image at its current location, then applies it masked on top of the normal image 85 | // this happens in both "sliderChanged" and "incrementAnimation" 86 | 87 | //******************************************************* 88 | 89 | - (IBAction) sliderChanged:(UISlider *)sender 90 | { 91 | double sVal = sender.value; 92 | [maskView setCenter:CGPointMake(sender.value/20 * 100 + 100, maskView.center.y)]; 93 | [normalView setCenter:CGPointMake(180+sVal, normalView.center.y)]; 94 | [overlayView setCenter:CGPointMake(180+sVal, overlayView.center.y)]; 95 | [overlayView setImage:[self maskImage:blurView.image withMask:[self captureView:maskHolder]]]; 96 | currVal = sVal; 97 | } 98 | 99 | - (void)runAnimate { 100 | [self queueAnimation]; 101 | } 102 | 103 | 104 | // This method moves you towards a target x-offset and lets the animation increment itself automatically 105 | - (void)queueAnimation { 106 | int targetNormalCenter; 107 | if (!isBlurred) { 108 | targetNormalCenter = 180; 109 | } 110 | else { 111 | targetNormalCenter = 200; 112 | } 113 | if (abs(normalView.center.x-targetNormalCenter)>2) { 114 | [self incrementAnimation:isBlurred]; 115 | } 116 | else { 117 | isBlurred = !isBlurred; 118 | } 119 | } 120 | 121 | -(void)incrementAnimation:(BOOL)upBool { 122 | int newX; 123 | int backgroundCenter = normalView.center.x; 124 | if (!upBool) { 125 | newX = 2; 126 | } 127 | else { 128 | newX = -2; 129 | } 130 | CGPoint nP = CGPointMake((backgroundCenter-newX), normalView.center.y); 131 | CGPoint oP = CGPointMake((backgroundCenter-newX), overlayView.center.y); 132 | CGPoint mP = CGPointMake(((200-backgroundCenter)*9) + 180, maskView.center.y); 133 | 134 | [normalView setCenter:nP]; 135 | [overlayView setCenter:oP]; 136 | [maskView setCenter:mP]; 137 | 138 | overlayView.image = nil; 139 | UIImage *mask = [self captureView:maskHolder]; 140 | UIImage *newOverlay = [self maskImage:blurView.image withMask:mask]; 141 | [overlayView setImage:newOverlay]; 142 | mask = nil; 143 | newOverlay = nil; 144 | [self performSelector:@selector(queueAnimation) withObject:nil afterDelay:.01]; 145 | return; 146 | } 147 | 148 | 149 | - (UIImage *)captureView:(UIView *)view { 150 | CGRect screenRect = [view bounds]; 151 | UIGraphicsBeginImageContext(screenRect.size); 152 | CGContextRef ctx = UIGraphicsGetCurrentContext(); 153 | [[UIColor blackColor] set]; 154 | CGContextFillRect(ctx, screenRect); 155 | [view.layer renderInContext:ctx]; 156 | UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); 157 | UIGraphicsEndImageContext(); 158 | ctx = nil; 159 | 160 | return newImage; 161 | } 162 | 163 | - (UIImage*) maskImage:(UIImage *)image withMask:(UIImage *)maskImage { 164 | 165 | CGImageRef srcImg = image.CGImage; 166 | CGImageRef maskRef = maskImage.CGImage; 167 | 168 | CGImageRef mask = CGImageMaskCreate(CGImageGetWidth(maskRef), 169 | CGImageGetHeight(maskRef), 170 | CGImageGetBitsPerComponent(maskRef), 171 | CGImageGetBitsPerPixel(maskRef), 172 | CGImageGetBytesPerRow(maskRef), 173 | CGImageGetDataProvider(maskRef), NULL, false); 174 | 175 | CGImageRef masked = CGImageCreateWithMask(srcImg, mask); 176 | UIImage *result = [UIImage imageWithCGImage:masked]; 177 | 178 | CGImageRelease(masked); 179 | CGImageRelease(mask); 180 | 181 | return result; 182 | } 183 | 184 | - (void)dealloc { 185 | [imagePreview dealloc]; 186 | [super dealloc]; 187 | } 188 | 189 | @end 190 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/Classes/UIImage+StackBlur.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+StackBlur.h 3 | // stackBlur 4 | // 5 | // Created by Thomas LANDSPURG on 07/02/12. 6 | // Copyright 2012 Digiwie. All rights reserved. 7 | // 8 | // iOS7StyleMaskTransparency implementation on iOS 9 | // 10 | // 11 | 12 | #import 13 | 14 | @interface UIImage (StackBlur) 15 | - (UIImage*) stackBlur:(NSUInteger)radius; 16 | - (UIImage *) normalize ; 17 | + (void) applyStackBlurToBuffer:(UInt8*)targetBuffer width:(const int)w height:(const int)h withRadius:(NSUInteger)inradius; 18 | @end 19 | 20 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/Classes/UIImage+StackBlur.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+StackBlur.m 3 | // stackBlur 4 | // 5 | // Created by Thomas on 07/02/12. 6 | // Copyright 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | /* 9 | Copyright (c) 2012, T.LANDSPURG 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without 13 | modification, are permitted provided that the following conditions are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright notice, this 16 | list of conditions and the following disclaimer. 17 | 2. Redistributions in binary form must reproduce the above copyright notice, 18 | this list of conditions and the following disclaimer in the documentation 19 | and/or other materials provided with the distribution. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 28 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | The views and conclusions contained in the software and documentation are those 33 | of the authors and should not be interpreted as representing official policies, 34 | either expressed or implied, of the FreeBSD Project. 35 | */ 36 | 37 | #import "UIImage+StackBlur.h" 38 | 39 | #define SQUARE(i) ((i)*(i)) 40 | inline static void zeroClearInt(int* p, size_t count) { memset(p, 0, sizeof(int) * count); } 41 | 42 | @implementation UIImage (StackBlur) 43 | 44 | 45 | // iOS7StyleMaskTransparency algorithm 46 | // from 47 | // http://incubator.quasimondo.com/processing/fast_blur_deluxe.php 48 | // by Mario Klingemann 49 | 50 | - (UIImage*) stackBlur:(NSUInteger)inradius 51 | { 52 | if (inradius < 1){ 53 | return self; 54 | } 55 | // Suggestion xidew to prevent crash if size is null 56 | if (CGSizeEqualToSize(self.size, CGSizeZero)) { 57 | return self; 58 | } 59 | 60 | // return [other applyBlendFilter:filterOverlay other:self context:nil]; 61 | // First get the image into your data buffer 62 | CGImageRef inImage = self.CGImage; 63 | int nbPerCompt = CGImageGetBitsPerPixel(inImage); 64 | if(nbPerCompt != 32){ 65 | UIImage *tmpImage = [self normalize]; 66 | inImage = tmpImage.CGImage; 67 | } 68 | CFMutableDataRef m_DataRef = CFDataCreateMutableCopy(0, 0, CGDataProviderCopyData(CGImageGetDataProvider(inImage))); 69 | UInt8 * m_PixelBuf=malloc(CFDataGetLength(m_DataRef)); 70 | CFDataGetBytes(m_DataRef, 71 | CFRangeMake(0,CFDataGetLength(m_DataRef)) , 72 | m_PixelBuf); 73 | 74 | CGContextRef ctx = CGBitmapContextCreate(m_PixelBuf, 75 | CGImageGetWidth(inImage), 76 | CGImageGetHeight(inImage), 77 | CGImageGetBitsPerComponent(inImage), 78 | CGImageGetBytesPerRow(inImage), 79 | CGImageGetColorSpace(inImage), 80 | CGImageGetBitmapInfo(inImage) 81 | ); 82 | 83 | // Apply stack blur 84 | const int imageWidth = CGImageGetWidth(inImage); 85 | const int imageHeight = CGImageGetHeight(inImage); 86 | [self.class applyStackBlurToBuffer:m_PixelBuf 87 | width:imageWidth 88 | height:imageHeight 89 | withRadius:inradius]; 90 | 91 | // Make new image 92 | CGImageRef imageRef = CGBitmapContextCreateImage(ctx); 93 | CGContextRelease(ctx); 94 | 95 | UIImage *finalImage = [UIImage imageWithCGImage:imageRef]; 96 | CGImageRelease(imageRef); 97 | CFRelease(m_DataRef); 98 | free(m_PixelBuf); 99 | return finalImage; 100 | } 101 | 102 | 103 | + (void) applyStackBlurToBuffer:(UInt8*)targetBuffer width:(const int)w height:(const int)h withRadius:(NSUInteger)inradius { 104 | // Constants 105 | const int radius = inradius; // Transform unsigned into signed for further operations 106 | const int wm = w - 1; 107 | const int hm = h - 1; 108 | const int wh = w*h; 109 | const int div = radius + radius + 1; 110 | const int r1 = radius + 1; 111 | const int divsum = SQUARE((div+1)>>1); 112 | 113 | // Small buffers 114 | int stack[div*3]; 115 | zeroClearInt(stack, div*3); 116 | 117 | int vmin[MAX(w,h)]; 118 | zeroClearInt(vmin, MAX(w,h)); 119 | 120 | // Large buffers 121 | int *r = malloc(wh*sizeof(int)); 122 | int *g = malloc(wh*sizeof(int)); 123 | int *b = malloc(wh*sizeof(int)); 124 | zeroClearInt(r, wh); 125 | zeroClearInt(g, wh); 126 | zeroClearInt(b, wh); 127 | 128 | const size_t dvcount = 256 * divsum; 129 | int *dv = malloc(sizeof(int) * dvcount); 130 | for (int i = 0;i < dvcount;i++) { 131 | dv[i] = (i / divsum); 132 | } 133 | 134 | // Variables 135 | int x, y; 136 | int *sir; 137 | int routsum,goutsum,boutsum; 138 | int rinsum,ginsum,binsum; 139 | int rsum, gsum, bsum, p, yp; 140 | int stackpointer; 141 | int stackstart; 142 | int rbs; 143 | 144 | int yw = 0, yi = 0; 145 | for (y = 0;y < h;y++) { 146 | rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0; 147 | 148 | for(int i = -radius;i <= radius;i++){ 149 | sir = &stack[(i + radius)*3]; 150 | int offset = (yi + MIN(wm, MAX(i, 0)))*4; 151 | sir[0] = targetBuffer[offset]; 152 | sir[1] = targetBuffer[offset + 1]; 153 | sir[2] = targetBuffer[offset + 2]; 154 | 155 | rbs = r1 - abs(i); 156 | rsum += sir[0] * rbs; 157 | gsum += sir[1] * rbs; 158 | bsum += sir[2] * rbs; 159 | if (i > 0){ 160 | rinsum += sir[0]; 161 | ginsum += sir[1]; 162 | binsum += sir[2]; 163 | } else { 164 | routsum += sir[0]; 165 | goutsum += sir[1]; 166 | boutsum += sir[2]; 167 | } 168 | } 169 | stackpointer = radius; 170 | 171 | for (x = 0;x < w;x++) { 172 | r[yi] = dv[rsum]; 173 | g[yi] = dv[gsum]; 174 | b[yi] = dv[bsum]; 175 | 176 | rsum -= routsum; 177 | gsum -= goutsum; 178 | bsum -= boutsum; 179 | 180 | stackstart = stackpointer - radius + div; 181 | sir = &stack[(stackstart % div)*3]; 182 | 183 | routsum -= sir[0]; 184 | goutsum -= sir[1]; 185 | boutsum -= sir[2]; 186 | 187 | if (y == 0){ 188 | vmin[x] = MIN(x + radius + 1, wm); 189 | } 190 | 191 | int offset = (yw + vmin[x])*4; 192 | sir[0] = targetBuffer[offset]; 193 | sir[1] = targetBuffer[offset + 1]; 194 | sir[2] = targetBuffer[offset + 2]; 195 | rinsum += sir[0]; 196 | ginsum += sir[1]; 197 | binsum += sir[2]; 198 | 199 | rsum += rinsum; 200 | gsum += ginsum; 201 | bsum += binsum; 202 | 203 | stackpointer = (stackpointer + 1) % div; 204 | sir = &stack[(stackpointer % div)*3]; 205 | 206 | routsum += sir[0]; 207 | goutsum += sir[1]; 208 | boutsum += sir[2]; 209 | 210 | rinsum -= sir[0]; 211 | ginsum -= sir[1]; 212 | binsum -= sir[2]; 213 | 214 | yi++; 215 | } 216 | yw += w; 217 | } 218 | 219 | for (x = 0;x < w;x++) { 220 | rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0; 221 | yp = -radius*w; 222 | for(int i = -radius;i <= radius;i++) { 223 | yi = MAX(0, yp) + x; 224 | 225 | sir = &stack[(i + radius)*3]; 226 | 227 | sir[0] = r[yi]; 228 | sir[1] = g[yi]; 229 | sir[2] = b[yi]; 230 | 231 | rbs = r1 - abs(i); 232 | 233 | rsum += r[yi]*rbs; 234 | gsum += g[yi]*rbs; 235 | bsum += b[yi]*rbs; 236 | 237 | if (i > 0) { 238 | rinsum += sir[0]; 239 | ginsum += sir[1]; 240 | binsum += sir[2]; 241 | } else { 242 | routsum += sir[0]; 243 | goutsum += sir[1]; 244 | boutsum += sir[2]; 245 | } 246 | 247 | if (i < hm) { 248 | yp += w; 249 | } 250 | } 251 | yi = x; 252 | stackpointer = radius; 253 | for (y = 0;y < h;y++) { 254 | int offset = yi*4; 255 | targetBuffer[offset] = dv[rsum]; 256 | targetBuffer[offset + 1] = dv[gsum]; 257 | targetBuffer[offset + 2] = dv[bsum]; 258 | rsum -= routsum; 259 | gsum -= goutsum; 260 | bsum -= boutsum; 261 | 262 | stackstart = stackpointer - radius + div; 263 | sir = &stack[(stackstart % div)*3]; 264 | 265 | routsum -= sir[0]; 266 | goutsum -= sir[1]; 267 | boutsum -= sir[2]; 268 | 269 | if (x == 0){ 270 | vmin[y] = MIN(y + r1, hm)*w; 271 | } 272 | p = x + vmin[y]; 273 | 274 | sir[0] = r[p]; 275 | sir[1] = g[p]; 276 | sir[2] = b[p]; 277 | 278 | rinsum += sir[0]; 279 | ginsum += sir[1]; 280 | binsum += sir[2]; 281 | 282 | rsum += rinsum; 283 | gsum += ginsum; 284 | bsum += binsum; 285 | 286 | stackpointer = (stackpointer + 1) % div; 287 | sir = &stack[stackpointer*3]; 288 | 289 | routsum += sir[0]; 290 | goutsum += sir[1]; 291 | boutsum += sir[2]; 292 | 293 | rinsum -= sir[0]; 294 | ginsum -= sir[1]; 295 | binsum -= sir[2]; 296 | 297 | yi += w; 298 | } 299 | } 300 | 301 | free(r); 302 | free(g); 303 | free(b); 304 | free(dv); 305 | } 306 | 307 | 308 | - (UIImage *) normalize { 309 | int width = self.size.width; 310 | int height = self.size.height; 311 | CGColorSpaceRef genericColorSpace = CGColorSpaceCreateDeviceRGB(); 312 | CGContextRef thumbBitmapCtxt = CGBitmapContextCreate(NULL, 313 | width, 314 | height, 315 | 8, (4 * width), 316 | genericColorSpace, 317 | kCGImageAlphaPremultipliedLast); 318 | CGColorSpaceRelease(genericColorSpace); 319 | CGContextSetInterpolationQuality(thumbBitmapCtxt, kCGInterpolationDefault); 320 | CGRect destRect = CGRectMake(0, 0, width, height); 321 | CGContextDrawImage(thumbBitmapCtxt, destRect, self.CGImage); 322 | CGImageRef tmpThumbImage = CGBitmapContextCreateImage(thumbBitmapCtxt); 323 | CGContextRelease(thumbBitmapCtxt); 324 | UIImage *result = [UIImage imageWithCGImage:tmpThumbImage]; 325 | CGImageRelease(tmpThumbImage); 326 | 327 | return result; 328 | } 329 | 330 | @end 331 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/Classes/stackBlurAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class NickTitleStackBlurVC; 4 | 5 | @interface stackBlurAppDelegate : NSObject { 6 | UIWindow *window; 7 | NickTitleStackBlurVC *viewController; 8 | } 9 | 10 | @property (nonatomic, retain) IBOutlet UIWindow *window; 11 | @property (nonatomic, retain) IBOutlet NickTitleStackBlurVC *viewController; 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/Classes/stackBlurAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "stackBlurAppDelegate.h" 2 | #import "NickTitleStackBlurVC.h" 3 | 4 | @implementation stackBlurAppDelegate 5 | 6 | @synthesize window; 7 | @synthesize viewController; 8 | 9 | 10 | #pragma mark - 11 | #pragma mark Application lifecycle 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 14 | 15 | // Override point for customization after application launch. 16 | 17 | // Set the view controller as the window's root view controller and display. 18 | self.window.rootViewController = self.viewController; 19 | [self.window makeKeyAndVisible]; 20 | 21 | return YES; 22 | } 23 | 24 | 25 | - (void)applicationWillResignActive:(UIApplication *)application { 26 | /* 27 | Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 28 | Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 29 | */ 30 | } 31 | 32 | 33 | - (void)applicationDidEnterBackground:(UIApplication *)application { 34 | /* 35 | Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 36 | If your application supports background execution, called instead of applicationWillTerminate: when the user quits. 37 | */ 38 | } 39 | 40 | 41 | - (void)applicationWillEnterForeground:(UIApplication *)application { 42 | /* 43 | Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. 44 | */ 45 | } 46 | 47 | 48 | - (void)applicationDidBecomeActive:(UIApplication *)application { 49 | /* 50 | Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 51 | */ 52 | } 53 | 54 | 55 | - (void)applicationWillTerminate:(UIApplication *)application { 56 | /* 57 | Called when the application is about to terminate. 58 | See also applicationDidEnterBackground:. 59 | */ 60 | } 61 | 62 | 63 | #pragma mark - 64 | #pragma mark Memory management 65 | 66 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 67 | 68 | } 69 | 70 | 71 | - (void)dealloc { 72 | [viewController release]; 73 | [window release]; 74 | [super dealloc]; 75 | } 76 | 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1552 5 | 12E55 6 | 3084 7 | 1187.39 8 | 626.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 2083 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUICustomObject 17 | IBUIViewController 18 | IBUIWindow 19 | 20 | 21 | YES 22 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 23 | 24 | 25 | PluginDependencyRecalculationVersion 26 | 27 | 28 | 29 | YES 30 | 31 | IBFilesOwner 32 | IBCocoaTouchFramework 33 | 34 | 35 | IBFirstResponder 36 | IBCocoaTouchFramework 37 | 38 | 39 | IBCocoaTouchFramework 40 | 41 | 42 | NickTitleStackBlurVC 43 | 44 | 45 | 1 46 | 1 47 | 48 | IBCocoaTouchFramework 49 | NO 50 | 51 | 52 | 53 | 292 54 | {320, 480} 55 | 56 | 57 | 58 | 59 | 1 60 | MSAxIDEAA 61 | 62 | NO 63 | NO 64 | 65 | IBCocoaTouchFramework 66 | YES 67 | 68 | 69 | 70 | 71 | YES 72 | 73 | 74 | delegate 75 | 76 | 77 | 78 | 4 79 | 80 | 81 | 82 | viewController 83 | 84 | 85 | 86 | 18 87 | 88 | 89 | 90 | window 91 | 92 | 93 | 94 | 19 95 | 96 | 97 | 98 | 99 | YES 100 | 101 | 0 102 | 103 | YES 104 | 105 | 106 | 107 | 108 | 109 | -1 110 | 111 | 112 | File's Owner 113 | 114 | 115 | 3 116 | 117 | 118 | stackBlur App Delegate 119 | 120 | 121 | -2 122 | 123 | 124 | 125 | 126 | 10 127 | 128 | 129 | 130 | 131 | 12 132 | 133 | 134 | 135 | 136 | 137 | 138 | YES 139 | 140 | YES 141 | -1.CustomClassName 142 | -1.IBPluginDependency 143 | -2.CustomClassName 144 | -2.IBPluginDependency 145 | 10.CustomClassName 146 | 10.IBPluginDependency 147 | 12.IBPluginDependency 148 | 3.CustomClassName 149 | 3.IBPluginDependency 150 | 151 | 152 | YES 153 | UIApplication 154 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 155 | UIResponder 156 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 157 | NickTitleStackBlurVC 158 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 159 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 160 | stackBlurAppDelegate 161 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 162 | 163 | 164 | 165 | YES 166 | 167 | 168 | 169 | 170 | 171 | YES 172 | 173 | 174 | 175 | 176 | 19 177 | 178 | 179 | 180 | YES 181 | 182 | NickTitleStackBlurVC 183 | UIViewController 184 | 185 | sliderChanged: 186 | id 187 | 188 | 189 | sliderChanged: 190 | 191 | sliderChanged: 192 | id 193 | 194 | 195 | 196 | imagePreview 197 | UIImageView 198 | 199 | 200 | imagePreview 201 | 202 | imagePreview 203 | UIImageView 204 | 205 | 206 | 207 | IBProjectSource 208 | ./Classes/NickTitleStackBlurVC.h 209 | 210 | 211 | 212 | stackBlurAppDelegate 213 | NSObject 214 | 215 | YES 216 | 217 | YES 218 | viewController 219 | window 220 | 221 | 222 | YES 223 | NickTitleStackBlurVC 224 | UIWindow 225 | 226 | 227 | 228 | YES 229 | 230 | YES 231 | viewController 232 | window 233 | 234 | 235 | YES 236 | 237 | viewController 238 | NickTitleStackBlurVC 239 | 240 | 241 | window 242 | UIWindow 243 | 244 | 245 | 246 | 247 | IBProjectSource 248 | ./Classes/stackBlurAppDelegate.h 249 | 250 | 251 | 252 | 253 | 0 254 | IBCocoaTouchFramework 255 | 256 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 257 | 258 | 259 | 260 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 261 | 262 | 263 | YES 264 | 3 265 | 2083 266 | 267 | 268 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/NickTitleStackBlurVC.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1552 5 | 12E55 6 | 3084 7 | 1187.39 8 | 626.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 2083 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUIImageView 17 | IBUISlider 18 | IBUIView 19 | 20 | 21 | YES 22 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 23 | 24 | 25 | PluginDependencyRecalculationVersion 26 | 27 | 28 | 29 | YES 30 | 31 | IBFilesOwner 32 | IBCocoaTouchFramework 33 | 34 | 35 | IBFirstResponder 36 | IBCocoaTouchFramework 37 | 38 | 39 | 40 | 274 41 | 42 | YES 43 | 44 | 45 | 274 46 | {320, 460} 47 | 48 | 49 | 50 | 51 | 1 52 | MCAwIDAAA 53 | 54 | 2 55 | NO 56 | IBCocoaTouchFramework 57 | 58 | 59 | 60 | 292 61 | {{106, 401}, {118, 23}} 62 | 63 | 64 | 65 | NO 66 | IBCocoaTouchFramework 67 | 0 68 | 0 69 | 5 70 | 1 71 | 20 72 | NO 73 | 74 | 75 | {{0, 20}, {320, 460}} 76 | 77 | 78 | 79 | 80 | 3 81 | MC43NQA 82 | 83 | 2 84 | 85 | 86 | NO 87 | 88 | IBCocoaTouchFramework 89 | 90 | 91 | 92 | 93 | YES 94 | 95 | 96 | view 97 | 98 | 99 | 100 | 7 101 | 102 | 103 | 104 | imagePreview 105 | 106 | 107 | 108 | 10 109 | 110 | 111 | 112 | sliderChanged: 113 | 114 | 115 | 3 116 | 117 | 12 118 | 119 | 120 | 121 | 122 | YES 123 | 124 | 0 125 | 126 | YES 127 | 128 | 129 | 130 | 131 | 132 | -1 133 | 134 | 135 | File's Owner 136 | 137 | 138 | -2 139 | 140 | 141 | 142 | 143 | 6 144 | 145 | 146 | YES 147 | 148 | 149 | 150 | 151 | 152 | 153 | 8 154 | 155 | 156 | 157 | 158 | 9 159 | 160 | 161 | 162 | 163 | 164 | 165 | YES 166 | 167 | YES 168 | -1.CustomClassName 169 | -1.IBPluginDependency 170 | -2.CustomClassName 171 | -2.IBPluginDependency 172 | 6.IBPluginDependency 173 | 8.IBPluginDependency 174 | 9.IBPluginDependency 175 | 176 | 177 | YES 178 | NickTitleStackBlurVC 179 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 180 | UIResponder 181 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 182 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 183 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 184 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 185 | 186 | 187 | 188 | YES 189 | 190 | 191 | 192 | 193 | 194 | YES 195 | 196 | 197 | 198 | 199 | 12 200 | 201 | 202 | 203 | YES 204 | 205 | NickTitleStackBlurVC 206 | UIViewController 207 | 208 | sliderChanged: 209 | id 210 | 211 | 212 | sliderChanged: 213 | 214 | sliderChanged: 215 | id 216 | 217 | 218 | 219 | imagePreview 220 | UIImageView 221 | 222 | 223 | imagePreview 224 | 225 | imagePreview 226 | UIImageView 227 | 228 | 229 | 230 | IBProjectSource 231 | ./Classes/NickTitleStackBlurVC.h 232 | 233 | 234 | 235 | 236 | 0 237 | IBCocoaTouchFramework 238 | 239 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 240 | 241 | 242 | YES 243 | 3 244 | 2083 245 | 246 | 247 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/Resources/angrycat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickTitle/iOS7-Trans-Blur/aa6adf6105eb43df69ca6874361bb942dfccc40c/iOS7StyleMaskTransparency/Resources/angrycat.png -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/Resources/mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickTitle/iOS7-Trans-Blur/aa6adf6105eb43df69ca6874361bb942dfccc40c/iOS7StyleMaskTransparency/Resources/mask.png -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/Resources/miniMask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickTitle/iOS7-Trans-Blur/aa6adf6105eb43df69ca6874361bb942dfccc40c/iOS7StyleMaskTransparency/Resources/miniMask.png -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/StackBlur_README: -------------------------------------------------------------------------------- 1 | This is a StackBlur implementation for iOS based on the algorithm of: 2 | 3 | http://incubator.quasimondo.com/processing/fast_blur_deluxe.php 4 | 5 | by Mario Klingemann 6 | 7 | To use it, just import the UIImage+StackBlur.h and .m in your project. 8 | 9 | Then, to blur an image: 10 | 11 | UIImage *newIma=[oldIma stackBlur:radius]; 12 | 13 | You can also apply the method to a buffer directly if you dont'have access to the full UIImage (see applyStackBlurToBuffer) 14 | 15 | The algorithm expect an RGBA format (32 bits/pixel). 16 | If it's not the case, the image will be transformed in a 32 bits/pixel format at each call. You can also use the [UIImage normalize] function of the library to do it once 17 | 18 | UIImage *myIma=[[UIImage imageNamed:@"blackWhite.png"] normalized]; 19 | 20 | ... 21 | UIImage *blurIma=[myIm stackBlur:radius]; 22 | 23 | Radius must be higher than 1 ... 24 | 25 | thomas.landspurg@gmail.com 26 | 27 | 28 | License: New BSD license. 29 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/iOS7StyleMaskTransparency-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/iOS7StyleMaskTransparency.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D3623260D0F684500981E51 /* stackBlurAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* stackBlurAppDelegate.m */; }; 11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 14 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 15 | 2899E5220DE3E06400AC0155 /* NickTitleStackBlurVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* NickTitleStackBlurVC.xib */; }; 16 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 17 | 28D7ACF80DDB3853001CB0EB /* NickTitleStackBlurVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* NickTitleStackBlurVC.m */; }; 18 | 8E1E10EB1770B89200AA29C1 /* mask.png in Resources */ = {isa = PBXBuildFile; fileRef = 8E1E10EA1770B89200AA29C1 /* mask.png */; }; 19 | 8E35E8D216E95A53001C95DC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E35E8D116E95A53001C95DC /* QuartzCore.framework */; }; 20 | 8E7EBBE31770F7B700833F08 /* angrycat.png in Resources */ = {isa = PBXBuildFile; fileRef = 8E7EBBE21770F7B700833F08 /* angrycat.png */; }; 21 | E9A020E114E1220000B451FC /* UIImage+StackBlur.m in Sources */ = {isa = PBXBuildFile; fileRef = E9A020E014E1220000B451FC /* UIImage+StackBlur.m */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXFileReference section */ 25 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 26 | 1D3623240D0F684500981E51 /* stackBlurAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stackBlurAppDelegate.h; sourceTree = ""; }; 27 | 1D3623250D0F684500981E51 /* stackBlurAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = stackBlurAppDelegate.m; sourceTree = ""; }; 28 | 1D6058910D05DD3D006BFB54 /* iOS7StyleMaskTransparency.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS7StyleMaskTransparency.app; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 30 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 31 | 2899E5210DE3E06400AC0155 /* NickTitleStackBlurVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NickTitleStackBlurVC.xib; sourceTree = ""; }; 32 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 33 | 28D7ACF60DDB3853001CB0EB /* NickTitleStackBlurVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NickTitleStackBlurVC.h; sourceTree = ""; }; 34 | 28D7ACF70DDB3853001CB0EB /* NickTitleStackBlurVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NickTitleStackBlurVC.m; sourceTree = ""; }; 35 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 36 | 32CA4F630368D1EE00C91783 /* iOS7StyleMaskTransparency_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iOS7StyleMaskTransparency_Prefix.pch; sourceTree = ""; }; 37 | 8D1107310486CEB800E47090 /* iOS7StyleMaskTransparency-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "iOS7StyleMaskTransparency-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 38 | 8E1E10EA1770B89200AA29C1 /* mask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mask.png; path = Resources/mask.png; sourceTree = ""; }; 39 | 8E35E8D116E95A53001C95DC /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 40 | 8E7EBBE21770F7B700833F08 /* angrycat.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = angrycat.png; path = Resources/angrycat.png; sourceTree = ""; }; 41 | E9A020DF14E1220000B451FC /* UIImage+StackBlur.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+StackBlur.h"; sourceTree = ""; }; 42 | E9A020E014E1220000B451FC /* UIImage+StackBlur.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+StackBlur.m"; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | 8E35E8D216E95A53001C95DC /* QuartzCore.framework in Frameworks */, 51 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 52 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 53 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 54 | ); 55 | runOnlyForDeploymentPostprocessing = 0; 56 | }; 57 | /* End PBXFrameworksBuildPhase section */ 58 | 59 | /* Begin PBXGroup section */ 60 | 080E96DDFE201D6D7F000001 /* Classes */ = { 61 | isa = PBXGroup; 62 | children = ( 63 | 1D3623240D0F684500981E51 /* stackBlurAppDelegate.h */, 64 | 1D3623250D0F684500981E51 /* stackBlurAppDelegate.m */, 65 | 28D7ACF60DDB3853001CB0EB /* NickTitleStackBlurVC.h */, 66 | 28D7ACF70DDB3853001CB0EB /* NickTitleStackBlurVC.m */, 67 | E9A020DF14E1220000B451FC /* UIImage+StackBlur.h */, 68 | E9A020E014E1220000B451FC /* UIImage+StackBlur.m */, 69 | ); 70 | path = Classes; 71 | sourceTree = ""; 72 | }; 73 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 1D6058910D05DD3D006BFB54 /* iOS7StyleMaskTransparency.app */, 77 | ); 78 | name = Products; 79 | sourceTree = ""; 80 | }; 81 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 080E96DDFE201D6D7F000001 /* Classes */, 85 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 86 | 29B97317FDCFA39411CA2CEA /* Resources */, 87 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 88 | 19C28FACFE9D520D11CA2CBB /* Products */, 89 | ); 90 | name = CustomTemplate; 91 | sourceTree = ""; 92 | }; 93 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 32CA4F630368D1EE00C91783 /* iOS7StyleMaskTransparency_Prefix.pch */, 97 | 29B97316FDCFA39411CA2CEA /* main.m */, 98 | ); 99 | name = "Other Sources"; 100 | sourceTree = ""; 101 | }; 102 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 8E7EBBE21770F7B700833F08 /* angrycat.png */, 106 | 8E1E10EA1770B89200AA29C1 /* mask.png */, 107 | 2899E5210DE3E06400AC0155 /* NickTitleStackBlurVC.xib */, 108 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 109 | 8D1107310486CEB800E47090 /* iOS7StyleMaskTransparency-Info.plist */, 110 | ); 111 | name = Resources; 112 | sourceTree = ""; 113 | }; 114 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | 8E35E8D116E95A53001C95DC /* QuartzCore.framework */, 118 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 119 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 120 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 121 | ); 122 | name = Frameworks; 123 | sourceTree = ""; 124 | }; 125 | /* End PBXGroup section */ 126 | 127 | /* Begin PBXNativeTarget section */ 128 | 1D6058900D05DD3D006BFB54 /* iOS7StyleMaskTransparency */ = { 129 | isa = PBXNativeTarget; 130 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "iOS7StyleMaskTransparency" */; 131 | buildPhases = ( 132 | 1D60588D0D05DD3D006BFB54 /* Resources */, 133 | 1D60588E0D05DD3D006BFB54 /* Sources */, 134 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 135 | ); 136 | buildRules = ( 137 | ); 138 | dependencies = ( 139 | ); 140 | name = iOS7StyleMaskTransparency; 141 | productName = stackBlur; 142 | productReference = 1D6058910D05DD3D006BFB54 /* iOS7StyleMaskTransparency.app */; 143 | productType = "com.apple.product-type.application"; 144 | }; 145 | /* End PBXNativeTarget section */ 146 | 147 | /* Begin PBXProject section */ 148 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 149 | isa = PBXProject; 150 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iOS7StyleMaskTransparency" */; 151 | compatibilityVersion = "Xcode 3.2"; 152 | developmentRegion = English; 153 | hasScannedForEncodings = 1; 154 | knownRegions = ( 155 | English, 156 | Japanese, 157 | French, 158 | German, 159 | ); 160 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 161 | projectDirPath = ""; 162 | projectRoot = ""; 163 | targets = ( 164 | 1D6058900D05DD3D006BFB54 /* iOS7StyleMaskTransparency */, 165 | ); 166 | }; 167 | /* End PBXProject section */ 168 | 169 | /* Begin PBXResourcesBuildPhase section */ 170 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 171 | isa = PBXResourcesBuildPhase; 172 | buildActionMask = 2147483647; 173 | files = ( 174 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 175 | 2899E5220DE3E06400AC0155 /* NickTitleStackBlurVC.xib in Resources */, 176 | 8E1E10EB1770B89200AA29C1 /* mask.png in Resources */, 177 | 8E7EBBE31770F7B700833F08 /* angrycat.png in Resources */, 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | }; 181 | /* End PBXResourcesBuildPhase section */ 182 | 183 | /* Begin PBXSourcesBuildPhase section */ 184 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 185 | isa = PBXSourcesBuildPhase; 186 | buildActionMask = 2147483647; 187 | files = ( 188 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 189 | 1D3623260D0F684500981E51 /* stackBlurAppDelegate.m in Sources */, 190 | 28D7ACF80DDB3853001CB0EB /* NickTitleStackBlurVC.m in Sources */, 191 | E9A020E114E1220000B451FC /* UIImage+StackBlur.m in Sources */, 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | }; 195 | /* End PBXSourcesBuildPhase section */ 196 | 197 | /* Begin XCBuildConfiguration section */ 198 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 199 | isa = XCBuildConfiguration; 200 | buildSettings = { 201 | ALWAYS_SEARCH_USER_PATHS = NO; 202 | COPY_PHASE_STRIP = NO; 203 | GCC_DYNAMIC_NO_PIC = NO; 204 | GCC_OPTIMIZATION_LEVEL = 0; 205 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 206 | GCC_PREFIX_HEADER = iOS7StyleMaskTransparency_Prefix.pch; 207 | INFOPLIST_FILE = "iOS7StyleMaskTransparency-Info.plist"; 208 | PRODUCT_NAME = iOS7StyleMaskTransparency; 209 | }; 210 | name = Debug; 211 | }; 212 | 1D6058950D05DD3E006BFB54 /* Release */ = { 213 | isa = XCBuildConfiguration; 214 | buildSettings = { 215 | ALWAYS_SEARCH_USER_PATHS = NO; 216 | COPY_PHASE_STRIP = YES; 217 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 218 | GCC_PREFIX_HEADER = iOS7StyleMaskTransparency_Prefix.pch; 219 | INFOPLIST_FILE = "iOS7StyleMaskTransparency-Info.plist"; 220 | PRODUCT_NAME = iOS7StyleMaskTransparency; 221 | VALIDATE_PRODUCT = YES; 222 | }; 223 | name = Release; 224 | }; 225 | C01FCF4F08A954540054247B /* Debug */ = { 226 | isa = XCBuildConfiguration; 227 | buildSettings = { 228 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 229 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 230 | GCC_C_LANGUAGE_STANDARD = c99; 231 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 232 | GCC_WARN_UNUSED_VARIABLE = YES; 233 | PREBINDING = NO; 234 | SDKROOT = iphoneos; 235 | }; 236 | name = Debug; 237 | }; 238 | C01FCF5008A954540054247B /* Release */ = { 239 | isa = XCBuildConfiguration; 240 | buildSettings = { 241 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 242 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 243 | GCC_C_LANGUAGE_STANDARD = c99; 244 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 245 | GCC_WARN_UNUSED_VARIABLE = YES; 246 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 247 | PREBINDING = NO; 248 | SDKROOT = iphoneos; 249 | }; 250 | name = Release; 251 | }; 252 | /* End XCBuildConfiguration section */ 253 | 254 | /* Begin XCConfigurationList section */ 255 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "iOS7StyleMaskTransparency" */ = { 256 | isa = XCConfigurationList; 257 | buildConfigurations = ( 258 | 1D6058940D05DD3E006BFB54 /* Debug */, 259 | 1D6058950D05DD3E006BFB54 /* Release */, 260 | ); 261 | defaultConfigurationIsVisible = 0; 262 | defaultConfigurationName = Release; 263 | }; 264 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iOS7StyleMaskTransparency" */ = { 265 | isa = XCConfigurationList; 266 | buildConfigurations = ( 267 | C01FCF4F08A954540054247B /* Debug */, 268 | C01FCF5008A954540054247B /* Release */, 269 | ); 270 | defaultConfigurationIsVisible = 0; 271 | defaultConfigurationName = Release; 272 | }; 273 | /* End XCConfigurationList section */ 274 | }; 275 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 276 | } 277 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/iOS7StyleMaskTransparency_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'stackBlur' target in the 'stackBlur' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /iOS7StyleMaskTransparency/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // stackBlur 4 | // 5 | // Created by Thomas on 07/02/12. 6 | // Copyright 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | --------------------------------------------------------------------------------