From 4dcf36e078ea94b0d600b0ee7638cb5fe818699d Mon Sep 17 00:00:00 2001 From: manikandanaitech Date: Sat, 31 Aug 2019 13:08:00 +0530 Subject: [PATCH] COllapse Expand section --- .DS_Store | Bin 0 -> 6148 bytes TablExpand.xcodeproj/project.pbxproj | 374 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../UserInterfaceState.xcuserstate | Bin 0 -> 30120 bytes .../xcdebugger/Breakpoints_v2.xcbkptlist | 5 + .../xcschemes/xcschememanagement.plist | 19 + TablExpand/AppDelegate.swift | 93 +++++ .../AppIcon.appiconset/Contents.json | 98 +++++ TablExpand/Assets.xcassets/Contents.json | 6 + TablExpand/Base.lproj/LaunchScreen.storyboard | 25 ++ TablExpand/Base.lproj/Main.storyboard | 103 +++++ TablExpand/Ext.swift | 15 + TablExpand/Info.plist | 45 +++ .../TablExpand.xcdatamodeld/.xccurrentversion | 8 + .../TablExpand.xcdatamodel/contents | 4 + TablExpand/TableViewCell.swift | 24 ++ TablExpand/TableViewCell1.swift | 32 ++ TablExpand/ViewController.swift | 357 +++++++++++++++++ TablExpand/ViewController3.swift | 18 + 20 files changed, 1241 insertions(+) create mode 100644 .DS_Store create mode 100644 TablExpand.xcodeproj/project.pbxproj create mode 100644 TablExpand.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 TablExpand.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 TablExpand.xcodeproj/project.xcworkspace/xcuserdata/anilkumar.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 TablExpand.xcodeproj/xcuserdata/anilkumar.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 TablExpand.xcodeproj/xcuserdata/anilkumar.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 TablExpand/AppDelegate.swift create mode 100644 TablExpand/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 TablExpand/Assets.xcassets/Contents.json create mode 100644 TablExpand/Base.lproj/LaunchScreen.storyboard create mode 100644 TablExpand/Base.lproj/Main.storyboard create mode 100644 TablExpand/Ext.swift create mode 100644 TablExpand/Info.plist create mode 100644 TablExpand/TablExpand.xcdatamodeld/.xccurrentversion create mode 100644 TablExpand/TablExpand.xcdatamodeld/TablExpand.xcdatamodel/contents create mode 100644 TablExpand/TableViewCell.swift create mode 100644 TablExpand/TableViewCell1.swift create mode 100644 TablExpand/ViewController.swift create mode 100644 TablExpand/ViewController3.swift diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f278f840dd732f1e92b40f4b3a8305cd0e34f291 GIT binary patch literal 6148 zcmeHKPjAyO6o2jtB#VTCw8JKGu*88&g<3>`-J-H`LSiBnJMgDVmS_zMc9f>;q^eT1 z55Nb2E3j|C7XS`?13n37-m^WlspZfMLX)3l|6c6(dv1QN?HB-9Z<2HXd;oB;5H?(_ zmKgO@S+Is_X(BR}qYuYWKm-Dkg=pLGKPo_Tw+;iGvlwzXH-GVTT*SGIvHw?GcQ6|z-<$v)d=%Aw}Nb6 z>FPS}(BGQPy6tX@-|aq}xA?5n-oD@B_a1cTbJumYZa;qZdUEpa{fCdAKA(R5rf9(M zpR4SK!87=d&QfKL!cyc?9AZClH;)*EIdy^k_!UOrX&;xw=u?n{s zo#USUVx7p=RspMkRbX`m%s%3Ht5Yq*Dqt13%dA~0TAgkQW^Sm zmmm%|7#OTIVh=8C~I9oxBy3k=p8H656_d@wUIGdC2bM#ubIg#!yT+S)2$ z6}YItntt@@{O|w${(q5VpR58_flH+TYwm + + + + diff --git a/TablExpand.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/TablExpand.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/TablExpand.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/TablExpand.xcodeproj/project.xcworkspace/xcuserdata/anilkumar.xcuserdatad/UserInterfaceState.xcuserstate b/TablExpand.xcodeproj/project.xcworkspace/xcuserdata/anilkumar.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..471478f08a93943ed5cbc7a8951682ee9fa3ab72 GIT binary patch literal 30120 zcmeHwcYIUj_war01iI3_+q7xZ-KK5Yq=oKumr`iUD5IolN<&9V(gJ09uc#;}E(ByK zEfo+DoGbwuDk6w%P!yRm1VI!RAn$o{n+`yK-}n9a`+UBCyo5A2_u1#1=R9ZKld7hA zgSlCuI7%RbBq)L=7=q=FamR-TP1Kvr24my!AY;{dy{_3jB1mh})f(V-Sx~dF$%#Nu zEnDwMmJ%G%hj1ob2v;J62qnUZa3X?;B%+9DB8E^9N}@keN|X`h#86@wF`O7dR1hPH zQN(DXg_uZ8A|?~9#1vvGF^!l`%pe{k<`B;k&k=Kp=ZVF{5@IRw8u2=@j95;rAXXA< zh}mJI7}QNjuIz`lf-G_JK`eoJ#me=PW(pvPW(aqN&JN* z$PqaqXXJuhksESH9w-O}BRL8|p(ql?BPB{ei6|ANp>&jmG^iL2Lgi>A8iht9Ez+YJ zG#=HV3CM&dqA6%9nuZ=nPoihgZ1fUZg4)q4v=+UE-a+r84QM0!5N$;}(I;px`T`w6 zN6}a4Ji34`q8sQY`U(Ak{zP|3ilj+<(uoWr6=W0}0(NfwZWWDz-p z97c{N$B>nzo~$9qk#%G}*+4duCUPPvV(ksTtTiRSCMPUx5)R%_sI{) zPsmTnJ>+NPUh;EtAGx3Wf;>VVC6AHE$*;*%Kb*O`jNUp-K2h^Zc#r|zfiZSU#Z`yKdF1veVU2EK|dnn2F3JW;*j6GnbjiEM#6~)-&%h?=zd2&CE7t zJF|<~&Fo=5WA-y&Fo&4K%yH%fbA`Fe{J>met}{O}H<+8u@5~>}pUfTRE_09hi|xnS zu(qrnYtK5do@@Xc$VRgEC}maSz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cY1Q*B5Ro+)}us@QcEug(nKXF8sFeLgA&ttA*DK zZxr4tyjRq($g#+!$i2v`D4R z`lagEs{1-pN9$Ofv(8QDq4U=H>7=?aU8F8rr_d$ol63=g*}4kdC|#wlN~hP=>c;CD zbWJ+5ZlZ3o?n&J&-7~spb(eLwb-(HU(B0J+=!fY?=tt_u=r`*3>JR9Tc3QYd@ss + + diff --git a/TablExpand.xcodeproj/xcuserdata/anilkumar.xcuserdatad/xcschemes/xcschememanagement.plist b/TablExpand.xcodeproj/xcuserdata/anilkumar.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..27a92b4 --- /dev/null +++ b/TablExpand.xcodeproj/xcuserdata/anilkumar.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,19 @@ + + + + + SchemeUserState + + TablExpand.xcscheme + + orderHint + 0 + + TablExpand.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/TablExpand/AppDelegate.swift b/TablExpand/AppDelegate.swift new file mode 100644 index 0000000..3f48ed7 --- /dev/null +++ b/TablExpand/AppDelegate.swift @@ -0,0 +1,93 @@ +// +// AppDelegate.swift +// TablExpand +// +// Created by Anil Kumar on 04/09/18. +// Copyright © 2018 Anil Kumar. All rights reserved. +// + +import UIKit +import CoreData + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // 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. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // 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. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // 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. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + // Saves changes in the application's managed object context before the application terminates. + self.saveContext() + } + + // MARK: - Core Data stack + + lazy var persistentContainer: NSPersistentContainer = { + /* + The persistent container for the application. This implementation + creates and returns a container, having loaded the store for the + application to it. This property is optional since there are legitimate + error conditions that could cause the creation of the store to fail. + */ + let container = NSPersistentContainer(name: "TablExpand") + container.loadPersistentStores(completionHandler: { (storeDescription, error) in + if let error = error as NSError? { + // Replace this implementation with code to handle the error appropriately. + // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + + /* + Typical reasons for an error here include: + * The parent directory does not exist, cannot be created, or disallows writing. + * The persistent store is not accessible, due to permissions or data protection when the device is locked. + * The device is out of space. + * The store could not be migrated to the current model version. + Check the error message to determine what the actual problem was. + */ + fatalError("Unresolved error \(error), \(error.userInfo)") + } + }) + return container + }() + + // MARK: - Core Data Saving support + + func saveContext () { + let context = persistentContainer.viewContext + if context.hasChanges { + do { + try context.save() + } catch { + // Replace this implementation with code to handle the error appropriately. + // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + let nserror = error as NSError + fatalError("Unresolved error \(nserror), \(nserror.userInfo)") + } + } + } + +} + diff --git a/TablExpand/Assets.xcassets/AppIcon.appiconset/Contents.json b/TablExpand/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/TablExpand/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TablExpand/Assets.xcassets/Contents.json b/TablExpand/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TablExpand/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TablExpand/Base.lproj/LaunchScreen.storyboard b/TablExpand/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f83f6fd --- /dev/null +++ b/TablExpand/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TablExpand/Base.lproj/Main.storyboard b/TablExpand/Base.lproj/Main.storyboard new file mode 100644 index 0000000..c9e4ed0 --- /dev/null +++ b/TablExpand/Base.lproj/Main.storyboard @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TablExpand/Ext.swift b/TablExpand/Ext.swift new file mode 100644 index 0000000..2f9a379 --- /dev/null +++ b/TablExpand/Ext.swift @@ -0,0 +1,15 @@ +// +// Ext.swift +// TablExpand +// +// Created by Anil Kumar on 05/09/18. +// Copyright © 2018 Anil Kumar. All rights reserved. +// + +import Foundation + +class StringGetData { + struct glovalVariable { + static var firstName = String(); + } +} diff --git a/TablExpand/Info.plist b/TablExpand/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/TablExpand/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/TablExpand/TablExpand.xcdatamodeld/.xccurrentversion b/TablExpand/TablExpand.xcdatamodeld/.xccurrentversion new file mode 100644 index 0000000..a7be89a --- /dev/null +++ b/TablExpand/TablExpand.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ + + + + + _XCCurrentVersionName + TablExpand.xcdatamodel + + diff --git a/TablExpand/TablExpand.xcdatamodeld/TablExpand.xcdatamodel/contents b/TablExpand/TablExpand.xcdatamodeld/TablExpand.xcdatamodel/contents new file mode 100644 index 0000000..476e5b6 --- /dev/null +++ b/TablExpand/TablExpand.xcdatamodeld/TablExpand.xcdatamodel/contents @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/TablExpand/TableViewCell.swift b/TablExpand/TableViewCell.swift new file mode 100644 index 0000000..c4c9669 --- /dev/null +++ b/TablExpand/TableViewCell.swift @@ -0,0 +1,24 @@ +// +// TableViewCell.swift +// TablExpand +// +// Created by Anil Kumar on 04/09/18. +// Copyright © 2018 Anil Kumar. All rights reserved. +// + +import UIKit + +class TableViewCell: UITableViewCell { + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + +} diff --git a/TablExpand/TableViewCell1.swift b/TablExpand/TableViewCell1.swift new file mode 100644 index 0000000..525a04f --- /dev/null +++ b/TablExpand/TableViewCell1.swift @@ -0,0 +1,32 @@ +// +// TableViewCell1.swift +// TablExpand +// +// Created by Anil Kumar on 04/09/18. +// Copyright © 2018 Anil Kumar. All rights reserved. +// + +import UIKit + +protocol customeDelegate { + func getSenderTag(_ tagValue: Int) +} + +class TableViewCell1: UITableViewCell { + + + var delegate : customeDelegate? = nil + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + + +} diff --git a/TablExpand/ViewController.swift b/TablExpand/ViewController.swift new file mode 100644 index 0000000..e0af7d7 --- /dev/null +++ b/TablExpand/ViewController.swift @@ -0,0 +1,357 @@ +// +// ViewController.swift +// TablExpand +// +// Created by Anil Kumar on 04/09/18. +// Copyright © 2018 Anil Kumar. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + + + @IBOutlet weak var tableview: UITableView! +// fileprivate var dataArray = Array() +// private var dataArray1 = Array() +// var data : [String] = [] + var countriesinEurope = ["France","Spain","Germany"] + var countriesinFrance = ["Japan","China","India","Nepal"] + var countriesinArgentia = ["Argentia","Brasil","Chile","India"] + var countriesingulf = ["behrain","soudi","Dubai","sarja"] + var arrayHeader = [1,1,1,1] + + override func viewDidLoad() { + +// print("\(Thread.isMainThread)") + MemoryAlertController.sharedInstance.presentCustomAlert(title: "", message: "Very Simple Expand Collapse UITableView Swift") + + tableview.delegate = self + tableview.dataSource = self + super.viewDidLoad() + } +} +extension ViewController : UITableViewDelegate,UITableViewDataSource{ + + func numberOfSections(in tableView: UITableView) -> Int { + return arrayHeader.count + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + + print("\(section)") + print(self.arrayHeader[section]) + + switch section { + case 0: + if self.arrayHeader[section] == 0 { + return 0 + }else{ + return countriesinEurope.count + } + case 1: + if self.arrayHeader[section] == 0 { + return 0 + }else{ + return countriesinFrance.count + } + case 2: + if self.arrayHeader[section] == 0 { + return 0 + }else{ + return countriesinArgentia.count + } + case 3: + if self.arrayHeader[section] == 0 { + return 0 + }else{ + return countriesingulf.count + } + default: + if self.arrayHeader[section] == 0 { + return 0 + }else{ + return countriesingulf.count + } + } + + +// if section == 0 { +// return 0 +// }else if section == 1 { +// return countriesinEurope.count +// }else if section == 2 { +// return countriesinFrance.count +// }else if section == 3 { +// return countriesinArgentia.count +// } +// +// return (self.arrayHeader[section] == 0) ? 0 : 4 + +// switch arrayHeader[section] { +// case 0: +// return 0 +// case 1: +// return countriesinEurope.count +// case 2: +// return countriesinFrance.count +// case 3: +// return countriesinArgentia.count +// default: +// return 0 +// } +// + +// return (self.arrayHeader[section] == 0) ? 0 : 4 + // return 3 +// switch section { +// case 0: +// return countriesinEurope.count +// case 1: +// return countriesinFrance.count +// case 2: +// return countriesinArgentia.count +// default: +// return 0 +// } + } + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { +// var cell : TableViewCell? = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as? TableViewCell +// +// if cell == nil { +// cell = TableViewCell(style: .default, reuseIdentifier: "cell") +// } + + let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) + +// if indexPath.section == 0 { +// cell.textLabel?.text = countriesingulf[indexPath.row]//"section: \(indexPath.section) row: \(indexPath.row)" +// }else if indexPath.section == 1 { +// cell.textLabel?.text = countriesinArgentia[indexPath.row]//"section: \(indexPath.section) row: \(indexPath.row)" +// }else{ +// cell.textLabel?.text = countriesingulf[indexPath.row]//"section: \(indexPath.section) row: \(indexPath.row)" +// } + +// return cell + +// cell?.data.text = "section: \(indexPath.section) row: \(indexPath.row)" + + switch indexPath.section { + case 0 : + cell.textLabel?.text = countriesinEurope[indexPath.row] + case 1 : + cell.textLabel?.text = countriesinFrance[indexPath.row] + case 2 : + cell.textLabel?.text = countriesinArgentia[indexPath.row] + case 3 : + cell.textLabel?.text = countriesingulf[indexPath.row] + default: + cell.textLabel?.text = "Other" + } + return cell + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 50 + } + + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + let viewHeader = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: 40)) + viewHeader.backgroundColor = UIColor.darkGray // Changing the header background color to gray + let button = UIButton(type: .custom) + button.frame = viewHeader.bounds + button.tag = section // Assign section tag to this button + button.addTarget(self, action: #selector(tapSection(sender:)), for: .touchUpInside) + button.setTitle("Section: \(section)", for: .normal) + viewHeader.addSubview(button) + return viewHeader + +// var headerCell: TableViewCell1? = tableView.dequeueReusableCell(withIdentifier: "HeaderCell") as? TableViewCell1 +// +// if headerCell == nil { +// headerCell = TableViewCell1(style: .default, reuseIdentifier: "HeaderCell") +// } +// +// headerCell?.backgroundColor = UIColor.darkGray +// headerCell?.delegate = self +//// headerCell?.textLabel?.textColor = UIColor.black +//// headerCell?.textLabel?.textAlignment = .center +// headerCell?.button.tag = section // Assign section tag to this button +// headerCell?.button.setTitle("Section: \(section)", for: .normal) + +// switch (section) { +// case 0: +// headerCell.headerCell.text = "Europe"; +// case 1: +// headerCell.headerCell.text = "Asia"; +// case 2: +// headerCell.headerCell.text = "South America"; +// default: +// headerCell.headerCell.text = "Other"; +// } +// return headerCell + } + + @objc func tapSection(sender: UIButton) { + + arrayHeader[sender.tag] = (arrayHeader[sender.tag] == 0) ? 1 : 0 + + print(arrayHeader[sender.tag]) + + tableview.reloadSections([sender.tag], with: .fade) + } + + + + +// func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { +// let headerCell = tableView.dequeueReusableCell(withIdentifier: "HeaderCell") as! TableViewCell1 +// switch (section) { +// case 0: +// headerCell.headerCell.text = "Europe"; +// return "Europe" +// case 1: +// headerCell.headerCell.text = "Asia"; +// return "Asia" +// case 2: +// headerCell.headerCell.text = "South America"; +// return "South America" +// default: +// headerCell.headerCell.text = "Other"; +// return "" +// } +// } + + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + return 40 + } +// func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { +// switch indexPath.section { +// case 0: +// print(countriesinEurope[indexPath.row]) +// case 1: +// print(countriesinFrance[indexPath.row]) +// case 2: +// print(countriesinArgentia[indexPath.row]) +// default: +// print("") +// } +// } +} + +final class MemoryAlertController { + private static var privateSharedInstance: MemoryAlertController? + static var sharedInstance: MemoryAlertController { + if privateSharedInstance == nil { + privateSharedInstance = MemoryAlertController() + } + return privateSharedInstance! + } + class func destroy() { + privateSharedInstance = nil + } + var customAlertView:UIView = UIView() + var backgroundView = UIView() + var customFont = "Arial" + + + func presentCustomAlert(title:String,message:String) { + if let window = UIApplication.shared.delegate!.window { + customAlertView.backgroundColor = UIColor().hexStringToUIColor(hex: "F7F7F7") + customAlertView.layer.cornerRadius = 15 + let alertViewWidth = (window?.frame.width)!-64 + + + backgroundView.frame = (window?.frame)! + backgroundView.backgroundColor = UIColor.black + backgroundView.alpha = 0.6 + window?.addSubview(backgroundView) + + // Title label is used for displaying the alert title. + let titleLabel = UILabel(frame: CGRect(x: 8, y: 8, width: alertViewWidth-16, height: 30)) + titleLabel.text = title + titleLabel.font = UIFont(name: customFont, size: 20) + titleLabel.textAlignment = .center + customAlertView.addSubview(titleLabel) + + // separatorLineView is used for highlighting a small line between the title and the message. + let separatorLineView = UIView() + separatorLineView.frame.origin = CGPoint(x: 0, y: titleLabel.frame.height + 8) + separatorLineView.frame.size = CGSize(width: (window?.frame.size.width)! - 50, height: 1) + separatorLineView.backgroundColor = UIColor.groupTableViewBackground + customAlertView.addSubview(separatorLineView) + + // Title label is used for displaying the alert title. + let messageLabel = UILabel(frame: CGRect(x: 18, y: separatorLineView.frame.origin.y + 20, width: alertViewWidth-16, height: heightForView(text: message, font: UIFont(name: customFont, size: 14)!, width: alertViewWidth-16))) + messageLabel.text = message + messageLabel.font = UIFont(name: customFont, size: 14) + messageLabel.numberOfLines = 20 + messageLabel.textAlignment = .center + messageLabel.adjustsFontSizeToFitWidth = true + customAlertView.addSubview(messageLabel) + + // bottomSeparatorLineView is used for highlighting a small line between the message and the button. + let bottomSeparatorLineView = UIView() + bottomSeparatorLineView.frame.origin = CGPoint(x: 0, y: messageLabel.frame.origin.y + messageLabel.frame.size.height + 15) + bottomSeparatorLineView.frame.size = CGSize(width: (window?.frame.size.width)! - 50, height: 1) + bottomSeparatorLineView.backgroundColor = UIColor.groupTableViewBackground + customAlertView.addSubview(bottomSeparatorLineView) + + let dismissButton = UIButton(frame: CGRect(x: 8, y: bottomSeparatorLineView.frame.origin.y + bottomSeparatorLineView.frame.size.height, width: alertViewWidth-16, height: 40)) + dismissButton.setTitle("OK", for: .normal) + dismissButton.titleLabel?.font = UIFont(name: customFont, size: 18) + dismissButton.setTitleColor(UIColor.blue, for: .normal) + dismissButton.addTarget(self, action: #selector(dismissAlertView), for: .touchUpInside) + customAlertView.addSubview(dismissButton) + + let height = titleLabel.frame.height + messageLabel.frame.height + dismissButton.frame.height + 45 + customAlertView.frame = CGRect(x: 0, y: 0, width: (window?.frame.size.width)! - 50, height:height) + customAlertView.center = window!.center + window?.addSubview(customAlertView) + } + } + + func heightForView(text:String, font:UIFont, width:CGFloat) -> CGFloat{ + let label:UILabel = UILabel(frame: CGRect(x: 0, y: 0, width: width, height: CGFloat.greatestFiniteMagnitude)) + label.numberOfLines = 0 + label.lineBreakMode = NSLineBreakMode.byWordWrapping + label.font = font + label.text = text + label.sizeToFit() + return label.frame.height + } + + @objc func dismissAlertView() { + DispatchQueue.main.async() { [weak self] () -> Void in + self?.customAlertView.removeFromSuperview() + self?.backgroundView.removeFromSuperview() + MemoryAlertController.destroy() + } +} +} + + +extension UIColor{ + func hexStringToUIColor (hex:String) -> UIColor { + var cString:String = hex.trimmingCharacters(in: .whitespacesAndNewlines).uppercased() + + if (cString.hasPrefix("#")) { + cString.remove(at: cString.startIndex) + } + + if ((cString.count) != 6) { + return UIColor.gray + } + + var rgbValue:UInt32 = 0 + Scanner(string: cString).scanHexInt32(&rgbValue) + + return UIColor( + red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0, + green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0, + blue: CGFloat(rgbValue & 0x0000FF) / 255.0, + alpha: CGFloat(1.0) + ) + } +} diff --git a/TablExpand/ViewController3.swift b/TablExpand/ViewController3.swift new file mode 100644 index 0000000..d40ea59 --- /dev/null +++ b/TablExpand/ViewController3.swift @@ -0,0 +1,18 @@ +// +// ViewController3.swift +// TablExpand +// +// Created by Anil Kumar on 05/09/18. +// Copyright © 2018 Anil Kumar. All rights reserved. +// + +import UIKit + + +class ViewController3: UIViewController { + override func viewDidLoad() { + super.viewDidLoad() + let dat = StringGetData.glovalVariable.firstName + } +} +