Giter Club home page Giter Club logo

Comments (8)

SonnetXavier avatar SonnetXavier commented on August 14, 2024

Hi @Karthikeyan1108 ,

One of the solution is to use our delegate method didMoveToPage , you can invoke the method calling your API in your View Controller from this delegate method.
Please refer the code snippet:

func didMoveToPage(_ controller: UIViewController, segment: SJSegmentTab?, index: Int) {
if segmentController.segments.count > 0 {

        if controller is TestimonialTableViewController{
            print(" TestimonialTableViewController")
              let viewController : TestimonialTableViewController = controller as! TestimonialTableViewController
            viewController.callAPI()
        }
       print("Selected tab")
    }
}

from sjsegmentedviewcontroller.

Karthikeyan1108 avatar Karthikeyan1108 commented on August 14, 2024

Thank you for your reply.It worked.The segments label are auto populating its size.
Example:
Firstviewcontroller title is "Home"
Secondviewcontroller title is "Live"
Thirdviewcontroller title is "Current affairs"

Now am able to see lot of gaps between the titles in the segment bar. is that empty space be reduced ?

from sjsegmentedviewcontroller.

SonnetXavier avatar SonnetXavier commented on August 14, 2024

Could you share a screenshot of this particular screen .

from sjsegmentedviewcontroller.

Karthikeyan1108 avatar Karthikeyan1108 commented on August 14, 2024

Kindly Look in to the Screenshot.

screen shot 2017-03-09 at 12 26 37 pm

from sjsegmentedviewcontroller.

subinspathilettu avatar subinspathilettu commented on August 14, 2024

@Karthikeyan1108 We are giving equal width for all title tabs. So that you see gap between adjacent tabs.

from sjsegmentedviewcontroller.

Karthikeyan1108 avatar Karthikeyan1108 commented on August 14, 2024

from sjsegmentedviewcontroller.

feliciaf avatar feliciaf commented on August 14, 2024

how was you able to show the view controllers? i am unable to..

from sjsegmentedviewcontroller.

Karthikeyan1108 avatar Karthikeyan1108 commented on August 14, 2024

Hi @feliciaf
I didn't understand your question.Could you please mention in detail?

from sjsegmentedviewcontroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.