Verify Permissions
diskutil verifyPermissions /
Repair Permissions
diskutil repairPermissions /
| // | |
| // ContentView.swift | |
| // LiquidCircles | |
| // | |
| // Created by Paul Stamatiou on 10/10/22. | |
| // | |
| import SwiftUI | |
| struct ContentView: View { |
| // | |
| // UITextViewPlaceholder.swift | |
| // TextViewPlaceholder | |
| // | |
| // Copyright (c) 2017 Tijme Gommers <[email protected]> | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| func takeScreenshot(view: UIView) -> UIImageView { | |
| UIGraphicsBeginImageContext(view.frame.size) | |
| view.layer.renderInContext(UIGraphicsGetCurrentContext()) | |
| let image = UIGraphicsGetImageFromCurrentImageContext() | |
| UIGraphicsEndImageContext() | |
| UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil) | |
| return UIImageView(image: image) | |
| } |
| (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { | |
| CollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"CellId" forIndexPath:[indexPath row]]; | |
| [[cell myButton] addTarget:self action:@selector(myClickEvent:event:) forControlEvents:UIControlEventTouchUpInside]; | |
| return cell; | |
| } |
| [ | |
| {name: 'Afghanistan', code: 'AF'}, | |
| {name: 'Åland Islands', code: 'AX'}, | |
| {name: 'Albania', code: 'AL'}, | |
| {name: 'Algeria', code: 'DZ'}, | |
| {name: 'American Samoa', code: 'AS'}, | |
| {name: 'AndorrA', code: 'AD'}, | |
| {name: 'Angola', code: 'AO'}, | |
| {name: 'Anguilla', code: 'AI'}, | |
| {name: 'Antarctica', code: 'AQ'}, |
| /* | |
| Distributed under The MIT License: | |
| http://opensource.org/licenses/mit-license.php | |
| Permission is hereby granted, free of charge, to any person obtaining | |
| a copy of this software and associated documentation files (the | |
| "Software"), to deal in the Software without restriction, including | |
| without limitation the rights to use, copy, modify, merge, publish, | |
| distribute, sublicense, and/or sell copies of the Software, and to |
| + (UIImage *)generatePhotoThumbnail:(UIImage *)image { | |
| // Create a thumbnail version of the image for the event object. | |
| CGSize size = image.size; | |
| CGSize croppedSize; | |
| CGFloat ratio = 64.0; | |
| CGFloat offsetX = 0.0; | |
| CGFloat offsetY = 0.0; | |
| // check the size of the image, we want to make it | |
| // a square with sides the size of the smallest dimension |