如何删除“<more”back =“”header =“”in =“”my =“”morecontroller =“”in =“”a =“”uitabview =“”series =“”of =“”tabs =“”

时间:2016-09-26 18:21:18

标签: ios swift uitabbarcontroller

=“”

我遇到的问题是我有一个容器视图挂在每个视图控制器的顶部。当我转到UITTabBar视图上的“更多”部分时,每个部分都有一个“更多”标题。我希望摆脱它,因为酒吧现在“超过”我的容器,因为它受限于超级视图。它还占用了太多的空间来让“更多”和我的容器一个接一个地查看。只是为了摆脱更多的视图控制器头。

public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapter.RecyclerViewHolder> {
    List<ListModel> myArrayList = new ArrayList<>();

    public RecyclerViewAdapter(ArrayList<ListModel> myArrayList) {
        this.myArrayList = myArrayList;
    }

    @Override
    public RecyclerViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.single_row, parent, false);
        RecyclerViewHolder recyclerViewHolder = new RecyclerViewHolder(view);

        return recyclerViewHolder;
    }

    @Override
    public void onBindViewHolder(final RecyclerViewHolder holder, int position) {
        ListModel listModel =  myArrayList.get(position);

        holder.videoID.setText(listModel.getVideoID());
        holder.title.setText(listModel.getTitle());
        holder.dateAdded.setText(listModel.getDateAdded());

        //

        String url = "http://img.youtube.com/vi/"+listModel.getVideoID()+"/0.jpg";
        if (url != null) {
            RequestQueue queue = Volley.newRequestQueue();

            // Retrieves an image specified by the URL, displays it in the UI.
            ImageRequest request = new ImageRequest(url,
                    new Response.Listener<Bitmap>() {
                        @Override
                        public void onResponse(Bitmap bitmap) {
                            //imageView.setImageBitmap(bitmap);
                            holder.thumbnail.setImageBitmap(bitmap);
                        }
                    }, 0, 0, null,
                    new Response.ErrorListener() {
                        public void onErrorResponse(VolleyError error) {
                            //imageView.setImageResource(R.mipmap.ic_launcher);
                        }
                    });

            queue.add(request);
        }
        //
    }

    @Override
    public int getItemCount() {
        return myArrayList.size();
    }

    public static class RecyclerViewHolder extends RecyclerView.ViewHolder {
        TextView videoID, title, dateAdded;
        ImageView thumbnail;

        public RecyclerViewHolder(View itemView) {
            super(itemView);
            videoID = (TextView) itemView.findViewById(R.id.tvVideoID);
            title = (TextView) itemView.findViewById(R.id.tvTitle);
            dateAdded = (TextView) itemView.findViewById(R.id.tvDateAdded);
            thumbnail = (ImageView) itemView.findViewById(R.id.ivThumbnail);
        }
    }
}

1 个答案:

答案 0 :(得分:0)

所以我能够四处寻找并回答......

我创建了一个UITabBarController类,然后将其添加到项目

class newTabcont : UITabBarController{

    func initializeTabs(){
        customizableViewControllers = nil
        self.navigationItem.leftBarButtonItem = nil
        self.navigationItem.hidesBackButton = true
        self.moreNavigationController.navigationBar.hidden = true
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        initializeTabs()
    }

}

我不再有问题......