iOS Dev

Here you can discuss problems and share new hacks about code
Aug 2, 2019 10:52
somebody tell me that how to reload UITableView after filling data.My problem is, after getting data form api, on main thread I process that data locally and after that I reload tableview. But Some time table reload earlier than data make. Please somebody tell me how to reload Tableview after create data.
Aug 2, 2019 10:48
hi
 
Jul 4, 2018 13:08
is here somebody who clear my doubts
Jul 4, 2018 13:07
Hi
Sep 29, 2017 07:00
Can we set local notification in back time(passed time)
?????
Sep 29, 2017 07:00
Hi
Dec 22, 2016 11:17
@ShobhakarTiwari only touch point(specific point)
Dec 22, 2016 08:00
how to change color of touch point in uiview
Dec 22, 2016 08:00
My problem is that
Dec 22, 2016 07:59
hii
 
Feb 1, 2017 08:49
yes I have to use nib
Feb 1, 2017 07:56
Actually I also tried with removed all code except table outlet and table.hidden
but it's showing same error.
Feb 1, 2017 07:41
I can share only this vc code zip
Feb 1, 2017 07:40
I can't share
Feb 1, 2017 07:39
sorry @Paulw11
Feb 1, 2017 07:36
actually, it's not my personal project, it's my company project.
So, I can't share code
Feb 1, 2017 07:35
why
Feb 1, 2017 07:33
I am getting creash on tbl_List_new.hidden = true
Feb 1, 2017 07:28
thsi is the my whole file code
Feb 1, 2017 07:27
import UIKit

class MonthListVC: UIViewController {

// @IBOutlet var tbl_List: UITableView!

@IBOutlet var tbl_List_new: UITableView!

@IBOutlet var lbl_noRecord: UILabel!
var arrYearMonths: Array<AnyObject> = []


let appobj = UIApplication.sharedApplication().delegate as! AppDelegate


override func viewDidLoad() {
super.viewDidLoad()
self.title = "Statics"
AddAnalytic(self.title!);
ShowMenuButton()



NSNotificationCenter.defaultCenter().addObserver(
self,
selector: #selector(loadData),
name: "AfterUpdateValues",
Feb 1, 2017 07:26
yes
Feb 1, 2017 07:23
please check
Feb 1, 2017 07:23
these are screenshots
Feb 1, 2017 07:22
Hi @Paulw11
Feb 1, 2017 07:20
@Paulw11 I have created viewcontroller from xib,and when we create Viewcontroller with xib then they connect automatically by fileowner and set the custom class name of that VC.
Feb 1, 2017 07:20
@Paulw11 all outlets are set, I also cross checked this many times.And I am using xib
Feb 1, 2017 07:20
full code is jsut it, no any special code
Feb 1, 2017 07:20
@Anbu.Karthik when I used tbl_List_new,it's always show runtime error
Feb 1, 2017 07:20
just normal condition check true or false
Feb 1, 2017 07:20
I already checked and also tried with created new outlel
 
Jan 27, 2017 14:00
is wrriten offline mode
Jan 27, 2017 14:00
i am saying that here for NSURLRequestReturnCacheDataDontLoad
Jan 27, 2017 13:59
No,
Jan 27, 2017 13:58
check this one
Jan 27, 2017 13:58
NSURLRequestReturnCacheDataDontLoad
Jan 27, 2017 13:57
but
Jan 27, 2017 13:49
I think w/o local db it's possible
Jan 27, 2017 13:49
beacuse i need to get some data in also offline
Jan 27, 2017 13:45
but it's not works in offline
Jan 27, 2017 13:44
- (void)URLSession:(NSURLSession *)session
dataTask:(NSURLSessionDataTask *)dataTask
willCacheResponse:(NSCachedURLResponse *)proposedResponse
completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler
{
NSURLResponse *response = proposedResponse.response;
NSHTTPURLResponse *HTTPResponse = (NSHTTPURLResponse*)response;
NSDictionary *headers = HTTPResponse.allHeaderFields;

NSCachedURLResponse *cachedResponse;
if (headers[@"Cache-Control"])
{
NSMutableDictionary *modifiedHeaders = headers.mutableCopy;
Jan 27, 2017 13:44
I tried cahed control
Jan 27, 2017 13:43
I have seted timeoutInterval:60.0 but in offline it's not working
Jan 27, 2017 13:43
can we load data in offline mode.I found this "NSURLRequestReturnCacheDataDontLoad".but it's not working.
Jan 27, 2017 13:43
I also tried with request.cachePolicy = NSURLRequestReturnCacheDataDontLoad;but nothing data showing,means cache not working
Jan 27, 2017 13:43
I added this policy request.cachePolicy = NSURLRequestReturnCacheDataElseLoad; but I am not able to cache data.Can you please tell me how to check data is coming from cache or not.
 
Apr 11, 2016 11:21
please upload resultent screenshot of your app
Apr 11, 2016 10:56
then make Iboutlet of it