Post

Replies

Boosts

Views

Activity

Reply to Pushed over tabs
Ok, I have other view controllers that don't have any code connected to them. The only other part of code is loading a form. All the code I have is there. I see. There may be some superhero who can read your mind and give you an example. Good luck.
Mar ’21
Reply to Pushed over tabs
would you like the rest of the code, the project or a screenshot of the storyboard? Any info that helps to write an example. You are not any more a beginner here in the dev forums. Please think yourself what is needed to write an answer best fit for you.
Mar ’21
Reply to Pushed over tabs
Here you go: It does not make sense shown only one view controller. You say you use tab bar controller and navigation controller. You have at least 3 view controllers, two for tab bar controller, and one for pushed in navigation controller.
Mar ’21
Reply to Pushed over tabs
 I am using tab navigation controller  I guess it is tab bar controller, if not, please tell us. What you have described is the usual behavior when you embed navigation controller inside any of the tab content. If you want to make what you wrote, you need to write some code to pop back the navigation controller. Typically, you make some class conform to UITabBarControllerDelegate and implement tabBarController(_:didSelect:).
Mar ’21
Reply to Why is this returning nil
Where would I put that? If you are showing the date just for debugging, you usually do not use DateFormatter and calculate the time difference between UTC and your region. I guess 17:30 UTC is 09:30 of your region, no? Then your code works as you expect. Only when you need to create a string representation for users, you need DateFormatter to convert Date to String. If you do want to use DateFormatter even for debugging output, you can write something like this: let calendar = Calendar(identifier: .gregorian) let components = calendar.dateComponents([.weekday], from: today) let nineThirtyToday = calendar.date( bySettingHour: 9, minute: 30, second: 0, of: today) let df = DateFormatter() df.timeZone = TimeZone.current df.dateStyle = .short df.timeStyle = .short print(df.string(from: nineThirtyToday ?? Date.distantPast)) (I recommend you to use the same calendar instance when getting components and nineThirtyToday to get consistent values.)
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Xcode Gives False '{' missing in class error
Your code is not properly formatted, so I cannot say if your code has some issue or not. Please try editing (or re-posting) your post with using Code block feature (icon ``). But Xcode often recalls old errors, so you may be seeing just an old error message. Have you tried Clean Build Folder or restarting your Xcode and Mac?
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to isHidden
ios11 Edition Xcode 9 It seems it is an ancient old version, why don't you use the latest one? Those lines show no effect in the simulator: Why? Just showing some code fragments does not make sense. It may be called from somewhere it does not affect, or you might have something wrong in other places. Please show enough context, what you have done till now? What is the code of your current project?
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21