Replicate Instagram Search-Style Swiping Tabs - swift

I'm trying out some new things in swift. However, i'm fairly inexperienced so please bear with me if I use wrong terminology.
I'm looking to replicate Instagram's search view, as shown here:
the animation to the next table is shown here:
http://i.imgur.com/XUxG31w.jpg
I'd appreciate any help y'all can offer on how to replicate this. Thanks.

This is a custom view that is not available by default in UIKit. However, it can be built by creating your own custom views.
You can use a UIScrollView with isPagingEnabled set to true. To implement the other features, you can use the scrollViewDidScroll method on UIScrollViewDelegate and the setContentOffset method to manipulate the scroll position in code.
Alternatively, there are some libraries on GitHub (example: XLPagerTabStrip Library) which you can include in your app. The source code is available so you can see how they implemented their views to build your own.

Related

What is this view in SwiftUI called?

Can anyone tell me what this sort of expandable toolbar, containing sliders, is called? I'm still a beginner in development and can't seem to find this views name, or any place where to learn it.
Thanks
It is a modal/half sheet/popover not available in SwiftUI as a pre-built View.
You can add the sliders, tab view and segmented picker per your requirements to the modal.
There are many way to implement it.
in iOS 15 Apple has provided adaptiveSheetPresentationController so it can be implemented using UIKit.
SwiftUI - Half modal?
Here is a WWDC21 video too
There are other ways, the referenced question has many solutions.
As #loren Epsom said, its a half sheet, and as its not pre built view in SwiftUI, I recommend using this framework, if the nature of your work allow 3rd party frameworks, Partial Sheet
The setup is pretty straight forward, for example you can use something like:
.partialSheet(isPresented: $isSheetShown) {
//Add the SwiftUI view that you want to appear in the partial sheet.
}
Read the How to Use

How to implement a static menu bar in an UIPageviewcontroller?

im trying to build in a static menu bar in my uipageviewcontroller like youtube has. Does anyone know how to implement it ?
What are you asking for is not part of the iOS SDK. As you will see the more you program, there is not point in hacking the SDK here and there to make visual elements look and behave the way you want. You're better off creating custom views in NIBs (or in code if so your heart desires), plugging the behavior you want into them, and use that instead of the SDK.
If you do want to use a UIPageViewController, here is a tutorial you can refer to for inspiration. The UISegmentControl can easily be replaced bya view of your own. Good luck!
EDIT: I realized I forgot how to include the link. Here you go: Switching controllers with a UISegmentedControl

Core-Plot region as part of View?

The dilemma below seems like a very easy problem to overcome, yet I can't find anything about how to tackle it. I've checked various tutorials, as well as all the sample code bundled with Core-Plot.
I've recently set up a new iPhone view-based application. However, I don't want the graph to take up the whole screen/view.
You can put a UIView inside your main UIView. Then change the type of that inner view to the UIView subclass that you need, such as CPGraphHostingView.

Inheritance in UIView in Xcode

So our problem is how to use inheritance using Xcode.
We have developed BB app. In which we needed a header at every screen. So made a BasicScreen and extended every screen from it.
What we need in Xcode is the same scenario but unluckily we cannot figure out how to role with it.
Can any one suggest us how to implement this or better way to do this...!!
examples or some useful links shared will be highly appreciated.
For this purpose you need to add header on each view or make a parent view and add subviews in that view below the coordinates of header.
This is not Xcode question. First read about inheritance in Objective C:
http://www.techotopia.com/index.php/Objective-C_Inheritance
Second: if you want to use your custom view add the header where this view is declared.
Edit:
It is probably a good idea to use UIViewController instead of UIView. In this case you can use Interface Builder, that will save you a lot of time and make your code more elegant. Google about that, there are tons of info.

How to make UITableView work within TTScrollView?

I'm solving a problem how to make tableviews work within three20's TTScrollView. I have a project which I want to rebuild using three20 library. There is one module which allows user to flip through set of "pages", which contains table showing some list of data.
My problem is that when I rebuilt this module to use three20's TTScrollView, tableviews inside the scrollview do not work anymore. In particular, it cannot be scrolled and cannot select an item, because all touches are intercepted by the scrollview. I'm getting mad about this and cannot figure out how to make it work.
I'm able to make work either tableview or scrollview but not both (means tableview intercepts vertical dragging, while scrollview horizontal). It worked fine with UIKit's UIScrollview, so there must be a way how to do this, but simply cannot figure out how.
Please help, I'm struggling with it yet couple of days now, but cannot get over.
thanks much for any hint.
Matthes,
Unfortunately not many people here at SO help out much with three20 questions for whatever reason. You may have better luck asking the three20 google group (search for that on google).
First guess though without trying it myself: try using three20's built in table items such as TTTableTextItem or TTTableImageItem ...in certain scenarios with three20, he has built in code to ignore everything you write except for his own built in controls (which might be the case here, not sure).
You can see examples of how he creates tables with this code in the TTCatalog example app that you can find via www.three20.info