From 773754148b7006140963dcebfab21766b6f1c6fb Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 13 May 2023 17:21:51 +0300 Subject: Starting to convert UIKit classes --- Juick.xcodeproj/project.pbxproj | 13 +++++++------ Juick/Supporting Files/Juick-Bridging-Header.h | 1 + Juick/Views/ContentLoadingCell.h | 17 ----------------- Juick/Views/ContentLoadingCell.m | 23 ----------------------- Juick/Views/ContentLoadingCell.swift | 17 +++++++++++++++++ Juick/Views/ContentLoadingCell.xib | 8 ++++---- 6 files changed, 29 insertions(+), 50 deletions(-) delete mode 100644 Juick/Views/ContentLoadingCell.h delete mode 100644 Juick/Views/ContentLoadingCell.m create mode 100644 Juick/Views/ContentLoadingCell.swift diff --git a/Juick.xcodeproj/project.pbxproj b/Juick.xcodeproj/project.pbxproj index bd7e526..e6d4931 100644 --- a/Juick.xcodeproj/project.pbxproj +++ b/Juick.xcodeproj/project.pbxproj @@ -37,12 +37,12 @@ 774746AD239F82A10001C7F9 /* NSDate+TimeAgo.m in Sources */ = {isa = PBXBuildFile; fileRef = 774746AC239F82A10001C7F9 /* NSDate+TimeAgo.m */; }; 774746B6239F872A0001C7F9 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 774746B5239F872A0001C7F9 /* CoreServices.framework */; }; 774C98CD25126C070073C70A /* Service.swift in Sources */ = {isa = PBXBuildFile; fileRef = 774C98CC25126C070073C70A /* Service.swift */; }; - 7761133821766A3000D350CD /* ContentLoadingCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7761133621766A3000D350CD /* ContentLoadingCell.m */; }; 7761133921766A3000D350CD /* ContentLoadingCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7761133721766A3000D350CD /* ContentLoadingCell.xib */; }; 7761135D21790B0300D350CD /* JuickPush.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 7761135521790B0200D350CD /* JuickPush.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 776C41BD1FD3EF180063B82E /* MessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 776C41BB1FD3EF180063B82E /* MessageCell.m */; }; 776C41BE1FD3EF180063B82E /* MessageCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 776C41BC1FD3EF180063B82E /* MessageCell.xib */; }; 776C41C11FD3FF6E0063B82E /* FeedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 776C41C01FD3FF6E0063B82E /* FeedViewController.m */; }; + 776D4EE32A0FD1A300C8BD91 /* ContentLoadingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 776D4EE22A0FD1A300C8BD91 /* ContentLoadingCell.swift */; }; 778560602343D24E00BB37A2 /* NSData+Hex.m in Sources */ = {isa = PBXBuildFile; fileRef = 7785605F2343D24E00BB37A2 /* NSData+Hex.m */; }; 778560632344CF6F00BB37A2 /* JuickNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 778560622344CF6F00BB37A2 /* JuickNavigationController.m */; }; 77975A1D182B6E9A00410C2B /* NewPostViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77975A1C182B6E9A00410C2B /* NewPostViewController.m */; }; @@ -151,8 +151,6 @@ 774746B5239F872A0001C7F9 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreServices.framework; sourceTree = DEVELOPER_DIR; }; 774C98C0251263720073C70A /* Juick-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Juick-Bridging-Header.h"; sourceTree = ""; }; 774C98CC25126C070073C70A /* Service.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Service.swift; sourceTree = ""; }; - 7761133521766A3000D350CD /* ContentLoadingCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContentLoadingCell.h; sourceTree = ""; }; - 7761133621766A3000D350CD /* ContentLoadingCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContentLoadingCell.m; sourceTree = ""; }; 7761133721766A3000D350CD /* ContentLoadingCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ContentLoadingCell.xib; sourceTree = ""; }; 7761135521790B0200D350CD /* JuickPush.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = JuickPush.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 7761135A21790B0300D350CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -162,6 +160,7 @@ 776C41BC1FD3EF180063B82E /* MessageCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MessageCell.xib; sourceTree = ""; }; 776C41BF1FD3FF6E0063B82E /* FeedViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FeedViewController.h; sourceTree = ""; }; 776C41C01FD3FF6E0063B82E /* FeedViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FeedViewController.m; sourceTree = ""; }; + 776D4EE22A0FD1A300C8BD91 /* ContentLoadingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentLoadingCell.swift; sourceTree = ""; }; 7785605E2343D24E00BB37A2 /* NSData+Hex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSData+Hex.h"; sourceTree = ""; }; 7785605F2343D24E00BB37A2 /* NSData+Hex.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSData+Hex.m"; sourceTree = ""; }; 778560612344CF6F00BB37A2 /* JuickNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JuickNavigationController.h; sourceTree = ""; }; @@ -429,9 +428,8 @@ 77B8B39A207A5629005CB20C /* MessageInputView.h */, 77B8B39B207A5629005CB20C /* MessageInputView.m */, 77B8B398207A52BD005CB20C /* MessageInputView.xib */, - 7761133521766A3000D350CD /* ContentLoadingCell.h */, - 7761133621766A3000D350CD /* ContentLoadingCell.m */, 7761133721766A3000D350CD /* ContentLoadingCell.xib */, + 776D4EE22A0FD1A300C8BD91 /* ContentLoadingCell.swift */, ); path = Views; sourceTree = ""; @@ -598,7 +596,7 @@ files = ( 77C36498224417FC0017522C /* DiscussionsController.m in Sources */, 770C86E325117D78009B6404 /* UIView+Shimmer.m in Sources */, - 7761133821766A3000D350CD /* ContentLoadingCell.m in Sources */, + 776D4EE32A0FD1A300C8BD91 /* ContentLoadingCell.swift in Sources */, 77E61A5E1FD4682B00B4E304 /* QuoteView.m in Sources */, 77317BBC181BBE8500D60005 /* AppDelegate.m in Sources */, 776C41C11FD3FF6E0063B82E /* FeedViewController.m in Sources */, @@ -803,6 +801,7 @@ PROVISIONING_PROFILE = ""; SUPPORTS_MACCATALYST = YES; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_OBJC_BRIDGING_HEADER = "Juick/Supporting Files/Juick-Bridging-Header.h"; TARGETED_DEVICE_FAMILY = "1,2,6"; WRAPPER_EXTENSION = app; }; @@ -825,6 +824,7 @@ PROVISIONING_PROFILE = ""; SUPPORTS_MACCATALYST = YES; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_OBJC_BRIDGING_HEADER = "Juick/Supporting Files/Juick-Bridging-Header.h"; TARGETED_DEVICE_FAMILY = "1,2,6"; WRAPPER_EXTENSION = app; }; @@ -972,6 +972,7 @@ PROVISIONING_PROFILE = ""; SUPPORTS_MACCATALYST = YES; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_OBJC_BRIDGING_HEADER = "Juick/Supporting Files/Juick-Bridging-Header.h"; TARGETED_DEVICE_FAMILY = "1,2,6"; WRAPPER_EXTENSION = app; }; diff --git a/Juick/Supporting Files/Juick-Bridging-Header.h b/Juick/Supporting Files/Juick-Bridging-Header.h index e11d920..5dfa23b 100644 --- a/Juick/Supporting Files/Juick-Bridging-Header.h +++ b/Juick/Supporting Files/Juick-Bridging-Header.h @@ -1,3 +1,4 @@ // // Use this file to import your target's public headers that you would like to expose to Swift. // +#import "UIView+Shimmer.h" diff --git a/Juick/Views/ContentLoadingCell.h b/Juick/Views/ContentLoadingCell.h deleted file mode 100644 index d9a8f6f..0000000 --- a/Juick/Views/ContentLoadingCell.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// ContentLoadingCell.h -// Juick -// -// Created by Vitaly Takmazov on 16/10/2018. -// Copyright © 2018 com.juick. All rights reserved. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface ContentLoadingCell : UITableViewCell - -@end - -NS_ASSUME_NONNULL_END diff --git a/Juick/Views/ContentLoadingCell.m b/Juick/Views/ContentLoadingCell.m deleted file mode 100644 index 90329fa..0000000 --- a/Juick/Views/ContentLoadingCell.m +++ /dev/null @@ -1,23 +0,0 @@ -// -// ContentLoadingCell.m -// Juick -// -// Created by Vitaly Takmazov on 16/10/2018. -// Copyright © 2018 com.juick. All rights reserved. -// - -#import "ContentLoadingCell.h" - -@implementation ContentLoadingCell - -- (void)awakeFromNib { - [super awakeFromNib]; - self.userInteractionEnabled = NO; -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - [self.contentView startShimmering]; -} - -@end diff --git a/Juick/Views/ContentLoadingCell.swift b/Juick/Views/ContentLoadingCell.swift new file mode 100644 index 0000000..a7f0cf0 --- /dev/null +++ b/Juick/Views/ContentLoadingCell.swift @@ -0,0 +1,17 @@ +// +// ContentLoadingCell.swift +// Juick +// +// Created by Vitaly Takmazov on 13.05.2023. +// Copyright © 2023 com.juick. All rights reserved. +// + +import UIKit + +@objc +class ContentLoadingCell: UITableViewCell { + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + self.contentView.startShimmering() + } +} diff --git a/Juick/Views/ContentLoadingCell.xib b/Juick/Views/ContentLoadingCell.xib index 9a8b659..36b2c50 100644 --- a/Juick/Views/ContentLoadingCell.xib +++ b/Juick/Views/ContentLoadingCell.xib @@ -1,19 +1,19 @@ - + - + - + - + -- cgit v1.2.3